Using fsolve for equations
Mostrar comentarios más antiguos
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?
Respuestas (1)
Categorías
Más información sobre Numeric Solvers en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!