Mercurial > hg > ltpda
diff m-toolbox/test/test_convert_pzmodel_rational.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/test/test_convert_pzmodel_rational.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,33 @@ +mc + +%% start from pzmodel +pzm = pzmodel(5, {[1 2]}, {[10 2]}); +pzm.setName; + + +%% Convert to rational + +rat = rational(pzm); + +%% Convert back + +pzm2 = pzmodel(rat) + + +%% Convert to parfrac + +pf = parfrac(rat); +pf2 = parfrac(pzm); + +%% resp + +pzmr = resp(pzm); +ratr = resp(rat); +pfr = resp(pf, plist('f', ratr)); +pfr2 = resp(pf2, plist('f', ratr)); + +iplot(pzmr, ratr) +iplot(pzmr, pfr) +iplot(pzmr, pfr2) + +