MATLAB Function Reference |
Syntax
Description
B = squeeze(A)
returns an array B
with the same elements as A
, but with all singleton dimensions removed. A singleton dimension is any dimension for which size(A,dim) = 1
.
Examples
Consider the 2-by-1-by-3 array Y = rand(2,1,3)
. This array has a singleton column dimension -- that is, there's only one column per page.
The command Z = squeeze(Y)
yields a 2-by-3 matrix:
See Also
sqrtm | ss2tf |
© 1994-2005 The MathWorks, Inc.