Why is it wrong: e3=sym('si​n(x)^2+cos​(x)=0')

1 回表示 (過去 30 日間)
zhenyu zeng
zhenyu zeng 2019 年 4 月 22 日
コメント済み: madhan ravi 2019 年 4 月 22 日
Why is it wrong: e3=sym('sin(x)^2+cos(x)=0')

採用された回答

madhan ravi
madhan ravi 2019 年 4 月 22 日
編集済み: madhan ravi 2019 年 4 月 22 日
sym('') was replaced by str2sym('') in latest versions and you seem to be using 2018b version
e3=str2sym('sin(x)^2+cos(x)=0')
% ^^^^^^^
  10 件のコメント
zhenyu zeng
zhenyu zeng 2019 年 4 月 22 日
Why not use str2sym('a') instead of sym('a’)?
madhan ravi
madhan ravi 2019 年 4 月 22 日
It only works for only a number or a variable. Read the documentations. Take MATLAB on-ramp course to learn the basics of MATLAB.

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

その他の回答 (1 件)

KSSV
KSSV 2019 年 4 月 22 日
syms x
e3 = sin(x)^2+cos(x)==0

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by