フィルターのクリア

how to write objective function for 4 variables

1 回表示 (過去 30 日間)
MD NASAR
MD NASAR 2012 年 7 月 1 日
Hi All i want to write a objective function for 4 variables and i want all 4 variables value in output, how to write it please help me.
Thank you.
  1 件のコメント
Yash
Yash 2012 年 7 月 8 日
post here the type of function and variables

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 7 月 8 日
function y = myObjective(x)
first_variable = x(1);
second_variable = x(2);
third_variable = x(3);
fourth_variable = x(4);
...
y = ....
end
Then any of the optimization functions will report the vector of four values that optimized the objective.

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by