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

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