フィルターのクリア

How can I get the Y value at once?

2 ビュー (過去 30 日間)
민제 강
민제 강 2021 年 7 月 13 日
回答済み: Image Analyst 2021 年 7 月 13 日
function Y = objectivefunction (X)
x1 = ;
x2 = ;
x3 = ;
x4 = ;
Y = x1*x4*[x1+x2+x3]+x3;
end
There are 20 x1, x2, x3 and x4 respectively.
I want to get 20 Y value.
I want to import data through Excel or Table.
Please let me know. Thank you.

採用された回答

Image Analyst
Image Analyst 2021 年 7 月 13 日
Did you try this:
t = readtable('x1x2x3x4.xlsx')
x1 = t.x1;
x2 = t.x2;
x3 = t.x3;
x4 = t.x4;
Y = x1 .* x4 .* (x1 + x2 + x3) + x3;

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by