The documentation you are reading does not apply to your version of MatLab. I can reproduce your error in 2008b, for example.
The old documentation says:
Note that these examples take equations of the form f(x) = 0
. If you need to solve equations of the form f(x) = q(x)
, you should use quoted lines. In particular, the team
s = solve('cos(2*x)+sin(x)=1')
In the future, pay attention to the line at the top of each online MatLab documentation page, which indicates which version the documentation refers to.
source share