comparison util/ksvd utils/printf.m @ 70:c3eca463202d

(none)
author idamnjanovic
date Wed, 16 Mar 2011 14:16:57 +0000
parents
children
comparison
equal deleted inserted replaced
69:5f1f436057ca 70:c3eca463202d
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