Problem using lsqnonlin for minimization of a function
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surrogate Optimization en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!