フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to write this function code

1 回表示 (過去 30 日間)
marwan alamah
marwan alamah 2020 年 6 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
y(2.5)=3*x.^5+2*x.^3+x.^2+7

回答 (1 件)

David Hill
David Hill 2020 年 6 月 9 日
y=@(x)3*x.^5+2*x.^3+7;
y(2.5);
  2 件のコメント
marwan alamah
marwan alamah 2020 年 6 月 9 日
what should i write after ;
if i pressed enter there is no answer only after deleting it
David Hill
David Hill 2020 年 6 月 9 日
y contains the function. You can evaluate y at any points you want and store the values in a different variable or default ans.
x=y(2.5);%x will now contain the value of the function y and 2.5
z=y(1:10);%z will by an array containing the values of y at 1,2,3,...10
display(x);%will display but you can just look at the work space to find the values as well

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by