how to print (function of x) in matlab ?

7 ビュー (過去 30 日間)
sawsan marz
sawsan marz 2018 年 11 月 16 日
回答済み: madhan ravi 2018 年 11 月 17 日
I want to print out the function I entered, for example I entered y=x.^4;
I want the matlab to calculate it and print it to me in term of x.
y=2x + 3x.^2 + ...
how can I do that ?
  2 件のコメント
Adam Danz
Adam Danz 2018 年 11 月 16 日
Image Analyst
Image Analyst 2018 年 11 月 16 日
How are you deriving that quadratic equation from the 4th order equation?
Why can't you just use input() to get the string and use fprintf() to "print out the function I entered"?
userResponse = input('Enter the formula : ', 's');
fprintf('%s\n', userResponse);
See
Enter the formula : y = x^4
y = x^4

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

回答 (1 件)

madhan ravi
madhan ravi 2018 年 11 月 17 日

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by