NONLCON must be a function using lsqnonlin
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone!
I am trying to estimate parameters using lsqnonlin and I get the following error:
Error using cnls
NONLCON must be a function
Error in lsqnonlin (line 220)
[xCurrent,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = cnls(caller, FUN,xCurrent,A,B,Aeq,Beq,LB,UB,NONLCON, ...
I have no nonlinear constraints and therefore I left NONLCON as empty square brackets. I don't understand where I am going wrong.
The error occurs on line 70.
0 commentaires
Réponse acceptée
Matt J
le 27 Août 2023
Modifié(e) : Matt J
le 27 Août 2023
No, you have set the nonlcon argument to Cexp which is a numeric vector. You should review the documentation for the correct ordering if the arguments.
6 commentaires
Matt J
le 28 Août 2023
If the optimization time is long, it doesn't necessarily mean you have slow convergence. If one execution of resfun takes a long time, that will also make the optimization time longer.
Plus de réponses (0)
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!