How To Convert 3d To 2d In Matlab