Summation in function handle
9 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I would like to have the following equation in a function handle (which represents a cost function in this case):

Herein, x_1 until x_4 are variables and Hp is an array containing 10 entries.
How would I implement this? I expiremented a bit but that did not work out properly.
for k=1:10
J_A = @(x) sum(abs(Hpe(k)-x(1)*exp(-1i*omega(k)*x(2))*(x(3)^2)/((1i*omega(k)^2)+2*x(3)*x(4)*1i*omega(k)+x(3)^2))^2);
end
It seems like only k=10 is taken into account this way.
Appreciate the help.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surrogate Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!