Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to Plot 3 dimensional data in Matlab
Replies: 3   Last Post: May 5, 2013 8:10 AM

 Messages: [ Previous | Next ]
 Yehonatan Posts: 32 Registered: 4/11/13
Re: How to Plot 3 dimensional data in Matlab
Posted: May 5, 2013 7:56 AM

Hello,
I didn't understand exactly what are you trying to do here. If your new to matlab i don't think you should start by plotting data using matrices with more then 2 dimensions. I can't help you if you insist on using matrices with 3 dimensions because i'm not familiar with the method. However, if you can use 2d matrices, which has a correspond matrix for each dimension i can help you.
This is an easy code that do not help to understand how to plot 3d plot but it useful to get you started:

x = linspace(-10,10,50);
y = linspace(-10,10,50);

[x3d_grid,y3d_grid] = meshgrid(x,y);

z3d_grid = sin(x3d_grid) - cos(y3d_grid);

figure
surf(x3d_grid,y3d_grid,z3d_grid);

Date Subject Author
5/5/13 Pavan
5/5/13 Nasser Abbasi
5/5/13 Yehonatan
5/5/13 Bruno Luong