Mercurial > hg > ltpda
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@specwin/char.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,36 @@ +% CHAR convert a specwin object into a string. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% DESCRIPTION: CHAR convert a specwin object into a string. +% +% CALL: string = char(sw); +% +% VERSION: $Id: char.m,v 1.11 2011/05/25 07:28:49 mauro Exp $ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +function varargout = char(varargin) + + %%% Get input + objs = [varargin{:}]; + + pstr = []; + for kk = 1:numel(objs) + w = objs(kk); + + pstr = ['(' pstr w.type]; + pstr = [pstr ', length=' num2str(w.len)]; + pstr = [pstr ', alpha=' num2str(w.alpha)]; + pstr = [pstr ', psll=' num2str(w.psll)]; + pstr = [pstr ', rov=' num2str(w.rov)]; + pstr = [pstr ', nenbw=' num2str(w.nenbw)]; + pstr = [pstr ', w3db=' num2str(w.w3db)]; + pstr = [pstr ', flatness=' num2str(w.flatness) '), ']; + + pstr = strrep(pstr, '_', '\_'); + end + + varargout{1} = pstr(1:end-2); + +end +