comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % Test reading and writing complex data to XML file.
2 %
3 % M Hewitson 19-04-07
4 %
5 % $Id: test_xml_complex.m,v 1.11 2009/02/02 15:20:38 hewitson Exp $
6 function test_xml_complex()
7
8 % Make some response data
9 poles = [pz(1,2) pz(40)];
10 zeros = [pz(10,3) pz(100)];
11 pzm = pzmodel(10, poles, zeros);
12 a = resp(pzm);
13 iplot(a)
14
15 % Save to XML file
16 save(pzm, 'pzm.xml')
17 save(a, 'a.xml')
18
19 % load files
20 pzm_r = pzmodel('pzm.xml');
21 a_r = ao('a.xml');
22 delete('pzm.xml')
23 delete('a.xml')
24
25 % compare objects
26 eq(pzm, pzm_r)
27 eq(a,a_r)
28
29 end