Programming Previous page   Next Page

Accessing Multidimensional Array Properties

You can use the following MATLAB functions to get information about multidimensional arrays you have created.

Array Property
Function
Example
Size
size
  • size(C)
    ans =
        2      2      1      2
      rows  columns  dim3   dim4
    
Dimensions
ndims
  • ndims(C)
    ans =
        4
    
Storage and format
whos

  • whos
    Name     Size       Bytes   Class
    
    A        2x2x2         64   double array
    B        2x2x2         64   double array
    C        4-D           64   double array
    D        4-D          192   double array
    
    Grand total is 48 elements using 384 bytes
    


Previous page  Creating Multidimensional Arrays Indexing Multidimensional Arrays Next page

© 1994-2005 The MathWorks, Inc.