MATLAB examples are failing

前端 未结 1 1057
误落风尘
误落风尘 2021-01-18 12:39

I don\'t have the slightest idea what\'s going on here, and Google provides no interesting help. I took the following example from http://www.mathworks.com/help/toolbox/symb

1条回答
  •  鱼传尺愫
    2021-01-18 13:19

    The documentation you're reading doesn't apply to your version of MatLab. I can reproduce your error in 2008b, for example.

    The older documentation says:

    Note that these examples assume equations of the form f(x) = 0. If you need to solve equations of the form f(x) = q(x), you must use quoted strings. In particular, the command

    s = solve('cos(2*x)+sin(x)=1')
    

    In the future, pay attention to the line at the top of every MatLab online documentation page where it says what version the documentation applies to.

    0 讨论(0)
提交回复
热议问题