functionoutput=trycreatFunction(x);
% this programming allows to learn how to createa function with one output and one input
output=x*x*2;
end

 採用された回答

Cris LaPierre
Cris LaPierre 2021 年 3 月 29 日

0 投票

You haven't told us what the error is, nor how you called your function.
Take a second to go through the examples in this documentation page. Just copy/paste one of them to your MATLAB, then modify it to work for your assignment.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInstrument Control Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by