Using fminbnd to find the max value.

조회 수: 13 (최근 30일)
Jose Grimaldo
Jose Grimaldo 2020년 4월 15일
편집: Walter Roberson 2020년 4월 15일
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)

채택된 답변

Walter Roberson
Walter Roberson 2020년 4월 15일
편집: Walter Roberson 2020년 4월 15일
[Bestx, Maxp] = fminbnd(@(x) -Eq1(x), 0.5, 5)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Verification, Validation, and Test에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by