Documentation Center

  • Trial Software
  • Product Updates


Class: categorical

Squeeze singleton dimensions from categorical array

The nominal and ordinal array data types might be removed in a future release. To represent ordered and unordered discrete, nonnumeric data, use the MATLAB® categorical data type instead.


B = squeeze(A)


B = squeeze(A) returns an array B with the same elements as the categorical array A but with all the singleton dimensions removed. A singleton is a dimension such that size(A,dim)=1. 2-D arrays are unaffected by squeeze so that row vectors remain rows.

See Also

Was this topic helpful?