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

2 visualizaciones (últimos 30 días)
nidhi humnekar
nidhi humnekar el 26 de Mzo. de 2021
Comentada: nidhi humnekar el 27 de Mzo. de 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)

Respuestas (1)

Walter Roberson
Walter Roberson el 26 de Mzo. de 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.

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by