3.3 Hilfe für Arrays

Eine genaue Erklärung der einzelnen Befehle in MATLAB erhält man durch Aufruf des Befehls help also z.B.: help ndims. Man kann auch den Links in diesem Dokument folgen, bzw. erhält man mit doc ndims die Hilfe in MATLAB in HTML Format.


MATLAB HELP: ndims
  Number of dimensions.

  N = NDIMS(X) returns the number of dimensions in the array X.
  The number of dimensions in an array is always greater than
  or equal to 2.  Trailing singleton dimensions are ignored.
  Put simply, it is LENGTH(SIZE(X)).

In Ergänzung dazu lautet die Hilfe für size:


MATLAB HELP: size
  Size of matrix.
  
  D = SIZE(X), for M-by-N matrix X, returns the two-element
  row vector D = [M, N] containing the number of rows and columns
  in the matrix.  For N-D arrays, SIZE(X) returns a 1-by-N
  vector of dimension lengths.

  [M,N] = SIZE(X) returns the number of rows and columns in
  separate output variables. [M1,M2,M3,...,MN] = SIZE(X)
  returns the length of the first N dimensions of X.

  M = SIZE(X,DIM) returns the length of the dimension specified
  by the scalar DIM.  For example, SIZE(X,1) returns the number
  of rows.

bzw. für length:


MATLAB HELP: length
  Length of vector.

  LENGTH(X) returns the length of vector X.  It is equivalent
  to MAX(SIZE(X)) for non-empty arrays and 0 for empty ones.



Winfried Kernbichler 2005-04-26