getting error Error in fminbnd (line 312) if fu <= fx

조회 수: 2 (최근 30일)
nidhi humnekar
nidhi humnekar 2021년 3월 26일
댓글: nidhi humnekar 2021년 3월 27일
function[kcm,Recm]=oserecritmin(alp1,alp2,Re1,Re2,N)
[Recm,kcm]=fminbnd('@oserecrit',alp1,alp2,[],Re1,Re2,N);
end
function [Rec,kc] = oserecrit(alp,Re1,Re2,N)
Rec= fzero('@osefun1',[Re1;Re2],[],alp,N);
kc = alp ;
end
i m having these two functions and one more named osefun1. while running oserecritmin i getting this error for oserecritmin(0.95, 1.1, 6500, 7000, 100)

답변 (1개)

Walter Roberson
Walter Roberson 2021년 3월 26일
You cannot use quoted functions with the @ syntax. Use @oserecrit an @osefun1
Also you appear to be trying to pass in extra parameters to the functions. That ability has been undocumented for over 15 years, and is known to fail in some circumstances. See
Also, the function you pass to fminbnd() cannot have multiple outputs.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by