help-octave
[Top][All Lists]
Advanced

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

Re: Problems with fzero


From: John W. Eaton
Subject: Re: Problems with fzero
Date: Thu, 31 Oct 2002 18:44:51 -0600

On 31-Oct-2002, Schloegl Alois <address@hidden> wrote:

| x=-10:.001:10;
| y=x-1.09-2.7217*log(1+(x/2.7217));
| plot(x,real(y'*[1,-i]))
| 
| 
| Based on this graph, the solutions 3.2106 and -1.7701 are correct. 
| for all x<2.7217, y(x) is complex. It looks like FZERO (and FSOLVE) look only 
| for the real part of the function y(x). If y(x) has a non-zero imaginary 
part, 
| a warning (or error) message should appear.

Yes, if you are using fsolve and one of the sampled values of your
function is complex, Octave should print

  warning: implicit conversion from complex scalar to real matrix

In the next development snapshot, Octave will also print

  warning: fsolve: ignoring imaginary part returned from user-supplied function

the first time this happens on any given call to fsolve.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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