Problem using lsqnonlin for minimization of a function
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surrogate Optimization 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!