Mercurial > hg > ltpda
comparison m-toolbox/classes/@paramValue/char.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 % CHAR convert a paramValue object into a string. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: CHAR convert a paramValue object into a string. | |
5 % | |
6 % CALL: string = char(obj) | |
7 % | |
8 % VERSION: $Id: char.m,v 1.3 2011/02/18 16:48:53 ingo Exp $ | |
9 % | |
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
11 | |
12 function varargout = char(varargin) | |
13 | |
14 objs = [varargin{:}]; | |
15 | |
16 pstr = ''; | |
17 for ii = 1:numel(objs) | |
18 pstr = sprintf('%s%s, ', pstr, utils.helper.val2str(objs(ii).options{objs(ii).valIndex})); | |
19 end | |
20 | |
21 % remove last ', ' | |
22 if length(pstr)>1 | |
23 pstr = pstr(1:end-2); | |
24 end | |
25 | |
26 %%% Prepare output | |
27 varargout{1} = pstr; | |
28 end | |
29 |