help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave_doc.pdf


From: Martin Helm
Subject: Re: Octave_doc.pdf
Date: Fri, 24 Dec 2010 16:15:06 +0100
User-agent: KMail/1.13.5 (Linux/2.6.34.7-0.5-desktop; KDE/4.5.4; x86_64; ; )

Am Freitag, 24. Dezember 2010, 13:44:58 schrieb Martin Helm:
> Am Freitag, den 24.12.2010, 09:05 +0100 schrieb Salvatore Amico:
> > 3.
> > f = @(x) x*x-5;
> > [x, fval, info, output] = fzero (@f, 0.5, FunValCheck)
> > -> Syntax error: FunValCheck
> 
> The same here, use f as parameter not @f
> 
> [x, fval, info, output] = fzero (f, 0.5)
> 

You need to create an optimset to use FunValCheck

octave:3> opt = optimset("FunValCheck", 1);
octave:4> opt
opt =
{
  FunValCheck =  1
}

octave:5> f = @(x) x*x-5;
octave:6> [x, fval, info, output] = fzero (f, 0.5, opt)
x = -2.2361
fval = -6.2610e-08
info =  1
output =
{
  iterations =  7
  funcCount =  17
  bracketx =

    -2.2361  -2.2361

  brackety =

     6.2172e-15  -6.2610e-08

}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]