Mercurial > hg > ltpda
diff m-toolbox/classes/@time/display.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@time/display.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,30 @@ +% DISPLAY display functionality for time objects. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% DESCRIPTION: Display functionality for time objects. +% +% VERSION: $Id: display.m,v 1.25 2010/08/29 20:52:38 nicolodi Exp $ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +function out = display(obj) + + out = {}; + for ii = 1:numel(obj) + out{ii} = format(obj(ii)); + end + out = reshape(out, size(obj)); + + if nargout == 0 + if isequal(get(0,'FormatSpacing'),'compact') + disp([inputname(1) ' =']); + disp(out); + else + disp(' '); + disp([inputname(1) ' =']); + disp(' '); + disp(out); + end + end + +end