How to switch from fminsearch to fmincon?
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Solver Outputs and Iterative Display in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!