annotate DL/RLS-DLA/private/printf.m @ 60:ad36f80e2ccf

(none)
author idamnjanovic
date Tue, 15 Mar 2011 12:20:59 +0000
parents
children
rev   line source
idamnjanovic@60 1 function str = printf(varargin)
idamnjanovic@60 2 %PRINTF Print formatted text to screen.
idamnjanovic@60 3 % PRINTF(FMT,VAL1,VAL2,...) formats the data in VAL1,VAL2,... according to
idamnjanovic@60 4 % the format string FMT, and prints the result to the screen.
idamnjanovic@60 5 %
idamnjanovic@60 6 % The call to PRINTF(FMT,VAL1,VAL2,...) simply invokes the call
idamnjanovic@60 7 % DISP(SPRINTF(FMT,VAL1,VAL2,...)). For a complete description of the
idamnjanovic@60 8 % format string options see function SPRINTF.
idamnjanovic@60 9 %
idamnjanovic@60 10 % STR = PRINTF(...) also returns the formatted string.
idamnjanovic@60 11
idamnjanovic@60 12
idamnjanovic@60 13 % Ron Rubinstein
idamnjanovic@60 14 % Computer Science Department
idamnjanovic@60 15 % Technion, Haifa 32000 Israel
idamnjanovic@60 16 % ronrubin@cs
idamnjanovic@60 17 %
idamnjanovic@60 18 % April 2008
idamnjanovic@60 19
idamnjanovic@60 20
idamnjanovic@60 21 if (nargout>0)
idamnjanovic@60 22 str = sprintf(varargin{:});
idamnjanovic@60 23 disp(str);
idamnjanovic@60 24 else
idamnjanovic@60 25 disp(sprintf(varargin{:}));
idamnjanovic@60 26 end