In most functions that support the (…,'like',x)
syntax, if
x
is an array of built-in numeric type, use the
(…,'like',x)
syntax to preserve the complexity and
sparsity of x
, or use the (…,class(x))
syntax to ensure x
is real and full.
The exception is cast(…,'like',x)
, which ensures
x
is full, but preserves its complexity.