Mercurial > hg > ltpda
comparison m-toolbox/classes/@specwin/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 specwin object into a string. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: CHAR convert a specwin object into a string. | |
5 % | |
6 % CALL: string = char(sw); | |
7 % | |
8 % VERSION: $Id: char.m,v 1.11 2011/05/25 07:28:49 mauro Exp $ | |
9 % | |
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
11 | |
12 function varargout = char(varargin) | |
13 | |
14 %%% Get input | |
15 objs = [varargin{:}]; | |
16 | |
17 pstr = []; | |
18 for kk = 1:numel(objs) | |
19 w = objs(kk); | |
20 | |
21 pstr = ['(' pstr w.type]; | |
22 pstr = [pstr ', length=' num2str(w.len)]; | |
23 pstr = [pstr ', alpha=' num2str(w.alpha)]; | |
24 pstr = [pstr ', psll=' num2str(w.psll)]; | |
25 pstr = [pstr ', rov=' num2str(w.rov)]; | |
26 pstr = [pstr ', nenbw=' num2str(w.nenbw)]; | |
27 pstr = [pstr ', w3db=' num2str(w.w3db)]; | |
28 pstr = [pstr ', flatness=' num2str(w.flatness) '), ']; | |
29 | |
30 pstr = strrep(pstr, '_', '\_'); | |
31 end | |
32 | |
33 varargout{1} = pstr(1:end-2); | |
34 | |
35 end | |
36 |