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

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by