Is it possible to view the size of a multidimensional array in the Workspace?
7 views (last 30 days)
Show older comments
MathWorks Support Team
on 4 Feb 2011
Edited: MathWorks Support Team
on 16 Apr 2019
I have a variable that holds an array that is 4-Dimensional or higher in the Workspace.
If I look under the field "Value" in the MATLAB Workspace Browser, "4-D double" is displayed. If I mouse-over the variable in the MATLAB Editor while in debug mode, the popup data tip displays "4-D double".
I would like to be able to see the fully specified size of this array in the Workspace. I would like the information to include the length of each dimension of the array.
In the same spirit, I would also like to be able to see the length of each dimension of the array in the popup data tip when I scroll the mouse over the variable in the MATLAB Editor in debug mode.
Accepted Answer
MathWorks Support Team
on 16 Apr 2019
Edited: MathWorks Support Team
on 16 Apr 2019
The ability to display the complete size of multidimensional arrays with more than 3 dimensions in the Workspace is not available in MATLAB without using a function.
As a workaround, it is possible to execute the SIZE function in the Command Window of MATLAB to get the size of the variable as follows:
>> a=rand(2,3,4,5);
>> size(a)
Moreover, the function WHOS provides the same information in the field "Size":
>> whos a
0 Comments
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!