Using fsolve for equations
Show older comments
I have a function of two variables,
let us say F=2*x(1)-3*exp(x(2))
I am trying to use fsolve to solve the equation F=0:
x0=[1;1]
options=optimset('Display', 'iter');
[m,fval]=fsolve(@myfun, x0, options);
My question is what if my function is F=y*x(1)-3*exp(x(2)) where y is a constant that i want to pass to F such that
if y=2, F=2*x(1)-3*exp(x(2))
if y=5, F=5*x(1)-3*exp(x(2))
then ... and variables are x(1) and x(2) only?
Answers (1)
Categories
Find more on Numeric Solvers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!