Error in fmincon (line 568) initVals.f = feval(funfcn{3},X,varargin{:})
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm getting this error when im tring to optimize certain parameters. My p_initial has 4 values, p_model(x) has 4 values but i dont know why its reading only 3 inputs
0 commentaires
Réponses (1)
Sargondjani
le 24 Oct 2021
As the error says there is no function P_model_main. You also only provided coded with a function called P_model. And please dont use pictures, but copy your code.
ALso it is not recommended to use global variables. If you have multiple parameters you could for example put them all in a structure called 'par', and use that as input argument to your function P_model. For example par.vv, par.q0 et cetera.
0 commentaires
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display 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!