Using fsolve for equations
Afficher commentaires plus anciens
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?
Réponses (1)
Catégories
En savoir plus sur Numeric Solvers dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!