I defined the following two functions:

function [z]=f(x,y)
z = x + y - 8
endfunction

function [z]=g(x,y)
z = 2*x + y - 8
endfunction

I then wanted to find the roots of the two functions (equations). That is, I want a pair of numbers (a,b) such that f(a,b) = g(a,b) = 0. So, I found the function fsolve in the documentation of Scilab which I believe will do what I want. So, I ran the following command:
fsolve([0;0],f,g)
and it produced the following error:
       Undefined variable: y
       at line 2 of function f called by :
 fsolve([0;0],f,g)
I do not understand this error and I am hoping that somebody can tell me what I am doing wrong.

Bob
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to