Using fzero to keep tolerance within limits
Show older comments
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);
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!