plot::Line2d doesn't work

I try to use the function : plot(plot::Line2d([1, 2], [3,-1]))
but it shows up an error : Unexpected operator, how can I fix it ? Thanks !

3 Comments

Where did you get that syntax from?
Yeah, it's the syntax for MUPAD, I got it run in MUPAD editor.
Is this possible to get it run on Matlab editor ? (by calling MUPAD I don't know how)
Adam
Adam on 26 Feb 2016
Edited: Adam on 26 Feb 2016
Well, I'm afraid I don't know anything about Mupad though that link you posted does start with the following big disclaimer:
'Use only in the MuPAD Notebook Interface. This functionality does not run in MATLAB.'
If you are in base Matlab then you simply shouldn't need the plot::Line2d part.
plot( x, y )
is the main Matlab syntax for plotting x points against y points - e.g.
plot( [1, 2], [3, 4] )
(Remember it is really useful if you can fill in the 'Products' part of the question form to let people know when a question involves something like the Symbolic Toolbox as there are a huge number of toolboxes in Matlab and most of us only have a subset of these so syntax from things like Symbolic Toolbox are very unfamiliar to me).

Sign in to comment.

Answers (1)

feval(symengine, 'plot::Line2d', [1, 2], [3,-1])
I do not know what the result will be.

Asked:

on 26 Feb 2016

Answered:

on 26 Feb 2016

Community Treasure Hunt

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

Start Hunting!