Using fminbnd to find the max value.

14 views (last 30 days)
How can I find the max value between 0.5 - 5 using fminbnd?
m=.09
b=2.7
Eq1=@(x) b.*(x.^m)
% I try this but I get an error
Maxp=fminbnd(Eq1.*-1,0.5,5)

Accepted Answer

Walter Roberson
Walter Roberson on 15 Apr 2020
Edited: Walter Roberson on 15 Apr 2020
[Bestx, Maxp] = fminbnd(@(x) -Eq1(x), 0.5, 5)

More Answers (0)

Categories

Find more on Verification, Validation, and Test 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!