comparison m-toolbox/classes/+utils/@prog/csv.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % CSV makes comma separated list of numbers
2 %
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %
5 % DESCRIPTION: CSV make comma separated list of numbers
6 %
7 % CALL: s = csv(x)
8 %
9 % INPUTS: x - the list of numbers to convert
10 %
11 % OUTPUTS: s - a makes comma separated list string
12 %
13 % EXAMPLE: s = utils.prog.csv([1:10])
14 %
15 % VERSION: $Id: csv.m,v 1.2 2010/05/17 08:32:06 nicolodi Exp $
16 %
17 % HISTORY: 14-05-2010 M Hueller
18 % Creation
19 %
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
22 function s = csv(x)
23 s = sprintf('%g,', x);
24 s = s(1:end-1);
25 end