[Scilab-users] Using the Function fsolve

Robert Sherry rsherry8 at comcast.net
Sun Aug 28 22:03:33 CEST 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160828/ff66010c/attachment.htm>


More information about the users mailing list