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