help-octave
[Top][All Lists]
Advanced

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

Problem with fsolve


From: Daniel Tourde
Subject: Problem with fsolve
Date: Wed, 21 Oct 1998 21:42:36 +0200

Hi !

I'm trying to use fsolve and I have a lot of troubles.

If I consider the following function :

function y = test2(x)

  y(1) = x(1)*x(2)-2;
  y(2) = x(2)^2 -4;
  y(3) = x(1)^2 -1;
  y(4) = x(1) + x(2) -3;

endfunction 

where quite obviously the solutions are 1 and 2 if the forth condition
is taken into account, I obtain :

1 and 2 if I type [y,index] = fsolve[test2,[10,10])
index = 1

but also the wrong solution 

-1 and -2 if I type [y,index] = fsolve[test2,[-10,-10])
index = 1

Where is the problem ? 

Why the y(4) specification is not taken into account ?

Thanks in advance, Best regards

                        Daniel

-- 
*********************************************************************
Daniel TOURDE                                   E-mail : address@hidden
The Aeronautical Research Institute of Sweden   Tel : +46 8 634 13 44
P.O. Box 11021 S-161 11 BROMMA, Sweden          Fax : +46 8  25 34 81
*********************************************************************



reply via email to

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