Asked by John
on 12 Dec 2011

Hi,

Could someone please advise me how I can plot this graph in matlab?

http://img39.imageshack.us/img39/9412/chartp.jpg

This graph just displays 45 profiles side by side and displayed in 3D. Velocity is on Y axis and time is on the x axis.

This is a 2D example

http://img3.imageshack.us/img3/8403/chart1o.jpg

I would really appreciate the help.

Thank you

*No products are associated with this question.*

Answer by Sean de Wolski
on 12 Dec 2011

`mesh` will do that with the appropriate settings.

doc mesh

Answer by John
on 12 Dec 2011

Hi,

I'm not very good at matlab, if I import the coordinates like this:

x = load('x.txt.'); y1 = load('y1.txt.'); y2 = load('y2.txt.');

What would be the command to plot the two lines side by side? so it would be (x,y1) and (x,y2).

Thank you very much

John

Sean de Wolski
on 12 Dec 2011

plot(x,y1,'b-',x,y2,'r--')

x/y1 will be a blue and solid, x/y2 will be red dashed

Answer by John
on 13 Dec 2011

hi,

What would be the command to plot the lines in the mesh grid so that it looks like this

http://img39.imageshack.us/img39/9412/chartp.jpg

I used the command above and rotated it but it came out like this

http://img339.imageshack.us/img339/4457/51226193x.jpg

Thanks for the help

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

Learn moreOpportunities for recent engineering grads.

Apply Today
## 0 Comments