MATLAB: Make Boxes on Surface in 3D Plot

3d plotssurface

How can I make the surface (3D Plot) like this in MATALAB. Like boxes on the surface.
1.PNG

Best Answer

A = rand(10,5,3);
A = sum(A);
A = squeeze(A);
surf(A,'LineWidth',2)
Boxes.PNG