Main Content


Dimension labels of dlarray



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


collapse all

Obtain the dimension labels of a dlarray.

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

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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

Introduced in R2019b