Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
simple graph plots in matlab

Subject: simple graph plots in matlab

From: john

Date: 19 Apr, 2013 19:09:08

Message: 1 of 2

hello,
i'm a newbe, trying to make a simple graph in matlab
tried this code:
 n=5;
 x = [0 0.0280 0.0470 0.0660 0.0820];
 y = [0 35.46 52.30 53.53 54.05];
 plot(x,y)

but does not work
sorry i know its simple, what am i doing wrong?


many thanks for any help!

Subject: simple graph plots in matlab

From: Steven_Lord

Date: 19 Apr, 2013 21:27:59

Message: 2 of 2



"john " <up623192@myport.ac.uk> wrote in message
news:kks4ok$qjn$1@newscl01ah.mathworks.com...
> hello,
> i'm a newbe, trying to make a simple graph in matlab
> tried this code:
> n=5;
> x = [0 0.0280 0.0470 0.0660 0.0820];
> y = [0 35.46 52.30 53.53 54.05];
> plot(x,y)
>
> but does not work

Please define "does not work" -- does it throw an error (and if so what is
the FULL text of that error), does it issue a warning (ditto on the full
text), does it give a graph that looks differently from how you expected it
to look, etc.?

> sorry i know its simple, what am i doing wrong?

If you forced me to guess, I'd have to guess that you created your own
function or variable named plot that's taking precedence over the PLOT
function included in MATLAB, or you've displayed a plot previously on the
axes and then turned HOLD ON. In the former case, rename or remove the
offending function or variable; in the latter case, create a completely new
figure and try plotting onto the new clean figure.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us