Remove dlarray
labels
Use stripdims
to ensure that a dlarray
behaves
like a numeric array of the same size, without any special behavior due to dimension
labels.
ndims(dlX)
can decrease after a stripdims
call
because the function removes trailing singleton labels.
dlX = dlarray(ones(3,2), 'SCB');
ndims(dlX)
ans = 3
dlX = stripdims(dlX); ndims(dlX)
ans = 2