How to Add Matrix as x0 Variable in fminsearch?

3 ビュー (過去 30 日間)
Dario Miric
Dario Miric 2022 年 1 月 28 日
回答済み: Torsten 2022 年 1 月 28 日
I am using fminsearch to minimize objective function. This requires defining variable x0 (usually vector) as estimates of solution which algorithm uses as starting point of finding solution. However, I want to create many estimates and evaluate objective function for each of these estimates. I tried to define x0 as matrix of estimates, but I didn't get result I wanted.

回答 (1 件)

Torsten
Torsten 2022 年 1 月 28 日
for i=1:number_of_estimates
value_of_objective(i) = objective_function(X0(:,i))
end
where X0 is the matrix in which the column vectors are the vectors x0 for which you want to call the objective.

カテゴリ

Help Center および File ExchangeNonlinear Optimization についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by