Using Imagesc to displace 3D in 2D

My original data matrix is of the size 1000x50x40. The program have generated data for each of the points within the matrix. I need to display the data using the imagesc command in either xy or xz plane only as slices.
May I gather some help on how to achieve that?

 Accepted Answer

I recommend you use slice() instead of imagesc() for this purpose.
But if you must:
OutXYArray = YourArray(:,:, ZPlaneNumber);
imagesc(OutXYArray);
OutXZArray = squeeze( YourArray(:, YPLaneNumber, :) );
imagesc(OutXZArray);

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!