Using fzero to keep tolerance within limits
Afficher commentaires plus anciens
I would like to get the value of f to zero with Th value changing. Th is my initial guess. Something similar to goalseek in excel. My objective function is x-y which is to be made to zero by changing the value of Th. The error is "FUN must be a function, a valid string expression, or an inline function object." I think using fzero would be easier rather than to write a code for bisection method. Right?
Th=10;
x=100*((0.15*70/Th)-(0.5*0.75));
y=6.205;
f = x-y;
z = fzero(f,Th);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with Optimization Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!