The indicated statement creates a
numel(<arg>)
by
numel(<arg>)
array.
This is not a common use case and can lead to more memory usage than
intended.
Rewrite the code to generate an array of data of the intended size and shape.
For example, if the original call is ones(numel(x))
,
write:
ones(numel(x), 1)
to create a vector of ones with
the same number of elements as x
.
ones(size(x))
to create an array of ones that is
the same size as x
.
ones(numel(x), numel(x))
to create an array of ones
that is numel(x)
by
numel(x)
.