MATLAB: Is it wrong: e3=sym(‘si​n(x)^2+cos​(x)=0’)

MATLABr2018bsymbolicSymbolic Math Toolbox

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

Best Answer

sym('') was replaced by str2sym('') in latest versions and you seem to be using 2018b version
e3=str2sym('sin(x)^2+cos(x)=0')
% ^^^^^^^