Mercurial > hg > ltpda
diff m-toolbox/test/test_xml_complex.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_xml_complex.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,29 @@ +% Test reading and writing complex data to XML file. +% +% M Hewitson 19-04-07 +% +% $Id: test_xml_complex.m,v 1.11 2009/02/02 15:20:38 hewitson Exp $ +function test_xml_complex() + + % Make some response data + poles = [pz(1,2) pz(40)]; + zeros = [pz(10,3) pz(100)]; + pzm = pzmodel(10, poles, zeros); + a = resp(pzm); + iplot(a) + + % Save to XML file + save(pzm, 'pzm.xml') + save(a, 'a.xml') + + % load files + pzm_r = pzmodel('pzm.xml'); + a_r = ao('a.xml'); + delete('pzm.xml') + delete('a.xml') + + % compare objects + eq(pzm, pzm_r) + eq(a,a_r) + +end \ No newline at end of file