
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);

