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

2 vues (au cours des 30 derniers jours)
nidhi humnekar
nidhi humnekar le 26 Mar 2021
Commenté : nidhi humnekar le 27 Mar 2021
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)

Réponses (1)

Walter Roberson
Walter Roberson le 26 Mar 2021
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.

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by