Using fsolve for equations
Ältere Kommentare anzeigen
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?
Antworten (1)
Kategorien
Mehr zu Numeric Solvers finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!