How to switch from fminsearch to fmincon?
Afficher commentaires plus anciens
Hello,
I am trying to curve-fit a two-parameter model to some exp. data to determine the two parameter of the model.
The code I am using is from an online example which I have modified accordingly (I am new to MATLAB....) and it gives me nice fits, however the values for the two constant i am getting range in [0, inf] and as a result have no physical meaning. I would like to introduce some limits to the search (lb, ub) but when I try to switch from fminsearch to fmincon I get error msgs of the type 'FMINCON only accepts inputs of data type double'
In sort, I am trying to switch from this:
[k0,ss0] = fminsearch(@myodeLSS,k00,[],data);
to this:
[x,fval] = fmincon(fun,x0,A,b,Aeq,beq,lb,ub)
and introduce lb and ub in the search, but it just won't happen...
Any help appreciated...
Thanks
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!