comparison util/ksvd utils/ompbox utils/printf.m @ 137:9207d56c5547 ivand_dev

New ompbox in utils for testing purposes
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Thu, 21 Jul 2011 14:07:41 +0100
parents
children
comparison
equal deleted inserted replaced
136:1334d2302dd9 137:9207d56c5547
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