Main Content

dims

Dimension labels of dlarray

Description

example

d = dims(dlX) returns the labels of dlX as a character array.

Examples

collapse all

Obtain the dimension labels of a dlarray.

dlX = dlarray(randn(3,4),'TS');
d = dims(dlX)
d = 
'ST'

Obtain the labels of an unlabeled dlarray.

y = stripdims(dlX);
d = dims(y)
d =

  0x0 empty char array

Input Arguments

collapse all

Input dlarray, specified as a dlarray object.

Example: dlX = dlarray(randn(3,4),'ST')

Output Arguments

collapse all

Dimension labels, returned as a character vector. If the input dlX is unlabeled, d is empty.

Introduced in R2019b