Documentation Center

  • Trial Software
  • Product Updates

squeeze

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.

Syntax

B = squeeze(A)

Description

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?