function x = randnLike(obj, varargin)
%RANDNLIKE Helper for calling RANDN using the like syntax.
%   
%   This function is for internal use only. It may be removed in the future.

%   Copyright 2019-2020 The MathWorks, Inc.

fd = obj.FormattedData;
obj.FormattedData = [];

% Remove any permutation. The shape is given by varargin.
obj = clearInternalPermutation(obj);

[fd,data] = extractData(fd);

xdata = randn(varargin{:}, 'like', data);

fd = insertData(fd, xdata);
obj.FormattedData = fd;
x = obj;
x = stripdims(x);
end
