MATLAB: Surface Plots of 3D Matrix After sum.

3d plotssumsurf

I have 3D matrix A size of (10 x 3 x 5), and If I sum it one time {i.e. A = sum(A)}, which gives (1 x 3 x 5). How can I plot this using "Surf"? or anyother 3D plot?

Best Answer

Try
B = sum(A);
surf(squeeze(B))
Related Question