Problem using lsqnonlin for minimization of a function
Afficher commentaires plus anciens
a) yexp is a vector [100,1] containing data taken from an experimental model
b) ymod(x) is a function that calculates, for a given x, another vector [100,1]. There is a known value for x that makes yexp-ymod(x)=0
I want to use lsqnonlin to solve the minimization problem yexp-ymod; below, what I have tried:
1) Created the function handle myfunction=@(x)ymod(values)-yexp, where values I have definided as a vector [68,1] of possible values for x.
2) Inputed result=lsqnonlin(@myfunction, x0)
However, the program is giving me back for result the same value as given for x0, which is wrong.
What should I do in order to have lsqnonlin correctly solving my problem?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surrogate Optimization 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!