comparison m-toolbox/test/test_pzmodel_fromParfrac.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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % TEST pzmodel/fromParfrac
3 %
4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 % HISTORY: 23-04-2009 L Ferraioli
6 % Creation
7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 %% VERSION
9
10 '$Id: test_pzmodel_fromParfrac.m,v 1.1 2009/10/21 12:50:43 luigi Exp $';
11
12 %% test
13
14 % build parfrac model
15 pfm = parfrac([1 0.3+0.7i 0.3-0.7i],[-2 -3.1+0.35i -3.1-0.35i],0);
16
17 % convert to pzmodel
18 pzm = pzmodel(pfm);
19
20 % get response of models
21 f = [logspace(-5,1,300)]';
22 rpfm = resp(pfm,plist('f',f));
23 rpzm = resp(pzm,plist('f',f));
24
25 % plot
26 iplot(rpfm,rpzm)
27 iplot(abs(rpfm)./abs(rpzm))