how to use fsolve

  • Follow


i tried to use fsolve for solving the set of two non linear equations as given in the product help of the matlab but i got an error "??? Input argument "x" is undefined.

Error in ==> myfun at 2
F = [2*x(1) - x(2) - exp(-x(1));
 "
How to use fsolve to solve set of two simple non linear equations..
0
Reply Pappu 9/22/2010 7:20:20 PM

"Pappu Kumar" <nawagarh@yahoo.co.in> wrote in message <i7dktk$24l$1@fred.mathworks.com>...
> i tried to use fsolve for solving the set of two non linear equations as given in the product help of the matlab but i got an error "??? Input argument "x" is undefined.
> 
> Error in ==> myfun at 2
> F = [2*x(1) - x(2) - exp(-x(1));
>  "
> How to use fsolve to solve set of two simple non linear equations..

Apparently x isn't defined:

function out = myfun(x)
 out = [2*x(1) - x(2) - exp(-x(1));
end

Perhaps you meant that?
0
Reply Sean 9/22/2010 8:27:24 PM


1 Replies
411 Views

(page loaded in 0.022 seconds)

Similiar Articles:













7/25/2012 6:29:22 AM


Reply: