help-octave
[Top][All Lists]

## Problem with fsolve

 From: John W. Eaton Subject: Problem with fsolve Date: Wed, 21 Oct 1998 14:47:46 -0500 (CDT)

```On 21-Oct-1998, Daniel Tourde <address@hidden> wrote:

| 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 ?

I think the problem is that fsolve expects a square system of
equations (number of variables == number of equations).

BTW, there is no need to send a message to me as well as the help- or
bug-octave mailing lists.  I read both.

Thanks,

jwe

```