MATLAB Answers

1

Is it possible to view a three-dimensional variable in a grid with guide numbers (as with two-dimensional arrays)?

Asked by Jonacchio on 14 Jun 2018
Latest activity Commented on by Jonacchio on 15 Jun 2018
Accepted Answer by KSSV

When viewing three-dimensional variables in Matlab, there are no grid lines and guide numbers in the margins as there are with two-dimensional arrays. This makes it difficult to copy and paste the values into other programs, and refer to specific rows and columns. Is there a setting that will allow me to change this?

I have attached two screenshots showing the difference in the way the two types of arrays are displayed.

  0 Comments

Sign in to comment.

1 Answer

Answer by KSSV
on 15 Jun 2018
Edited by KSSV
on 15 Jun 2018
 Accepted Answer

You take out the array you want and see.

A = rand(100,100,100) ;    % you cannot see here margin numbers 
T = A(:,:,7) ;             % Now T is 2D you can see margins here. 

Still, I am wondering..why you want margin numbers. :|

  1 Comment

Thanks! This is a easy workaround.

When scoring data, I use the margin numbers to check my code against the raw data.

Sign in to comment.