gusucode.com > bigdata 工具箱 matlab源码程序 > bigdata/@tall/round.m
function ty = round(tx,varargin) %ROUND rounds towards nearest decimal or integer % Support syntax for tall array: % Y = ROUND(X) % Y = ROUND(X, N) % Y = ROUND(X, N, 'significant') % Y = ROUND(X, N, 'decimals') % % Support syntax for tall duration: % B = ROUND(A) % B = ROUND(A,UNIT) % % See also ROUND, DURATION/ROUND. % Copyright 2016 The MathWorks, Inc. narginchk(1,3); checkNotTall(upper(mfilename), 1, varargin{:}); ty = elementfun(@(x)round(x,varargin{:}), tx); ty = invokeOutputInfo('preserveLogicalCharToDouble', ty, {tx}); ty.Adaptor = copySizeInformation(ty.Adaptor, tx.Adaptor); end