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