Unexpected operator for 'plotinequality'

  • Thread starter Thread starter ENDLESSYOU
  • Start date Start date
  • Tags Tags
    Operator
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 6K views
ENDLESSYOU
Messages
29
Reaction score
0
When I try to operate this command
plot(plot::Inequality(x^2 + y^2 < 1,x = -1.5..1.5, y = -1.5..1.5))
It failed, and displayed
Error: Unexpected MATLAB operator.
How can I fix it?
 
Physics news on Phys.org
jedishrfu said:
What version of MATLAB do you have? According to MATLAB docs that operator was added in MATLAB 2012b:

http://www.mathworks.com/help/symbolic/mupad_ref/plot-inequality.html

anyway here's an alternative scheme:

http://stackoverflow.com/questions/11345838/how-to-plot-inequalities

My version is R2012b, and I just copied the codes form the examples on the webpage. But it failed. It seems like the problem is about '::'.
 
ENDLESSYOU said:
My version is R2012b, and I just copied the codes form the examples on the webpage. But it failed. It seems like the problem is about '::'.

The reference below said that it only works in a MUPAD notebook and to try this:

evalin(symengine, 'plot(plot::Inequality(x^2 + y^2 < 1,x = -1.5..1.5, y = -1.5..1.5))')

http://www.mathworks.com/matlabcentral/answers/14607

Doesn't work for me as I don't have these extensions and I am at MATLAB 2011b
 
jedishrfu said:
The reference below said that it only works in a MUPAD notebook and to try this:

evalin(symengine, 'plot(plot::Inequality(x^2 + y^2 < 1,x = -1.5..1.5, y = -1.5..1.5))')

http://www.mathworks.com/matlabcentral/answers/14607

Doesn't work for me as I don't have these extensions and I am at MATLAB 2011b

Thanks. I can use 'mphandle = mupad' to create a MuPAD notebook, and input the syntax.