UNEXPECTED MATLAB EXPRESSION displayed whenI try to assign a function to a variable

Hello.
In the command window, I created variables a, and x by commands:
syms a syms x
Now, when I try to assign a value to a by writing:
a=(x^2-19x+90)
to generate a equals to [x squared] minus [19 times x] plus [90]
it gives me unexpected matlab expression error.
What am I doing wrong? Please help.

 採用された回答

Walter Roberson
Walter Roberson 2013 年 9 月 27 日
a=(x^2-19*x+90)
multiplication must be done explicitly.

その他の回答 (0 件)

カテゴリ

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

質問済み:

2013 年 9 月 27 日

回答済み:

2013 年 9 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by