Main Content


Dimension labels of dlarray



d = dims(dlX) returns the data format of dlX as a character array. The data format provides the dimension labels for each dimension in dlX.


collapse all

Obtain the dimension labels of a formatted dlarray.

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

Obtain the labels of an unformatted 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 unformatted, 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