Home > classes > @ao > private > xml_read_pzmodel.m

xml_read_pzmodel

PURPOSE ^

XML_READ_PZMODEL read a pzmodel object from the given input node.

SYNOPSIS ^

function pzm = xml_read_pzmodel(node)

DESCRIPTION ^

 XML_READ_PZMODEL read a pzmodel object from the given input node.
 
 M Hewitson 16-02-07
 
 $Id: xml_read_pzmodel.m,v 1.2 2007/07/30 12:13:10 ingo Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function pzm = xml_read_pzmodel(node)
0002 
0003 % XML_READ_PZMODEL read a pzmodel object from the given input node.
0004 %
0005 % M Hewitson 16-02-07
0006 %
0007 % $Id: xml_read_pzmodel.m,v 1.2 2007/07/30 12:13:10 ingo Exp $
0008 %
0009 
0010 disp('-- reading pzmodel');
0011 pzm = pzmodel();
0012 ps = [];
0013 zs = [];
0014 
0015 children = node.getChildNodes;
0016 for j=1:children.getLength
0017   ch = children.item(j-1);  
0018   nodeName = char(ch.getNodeName);  
0019   switch nodeName
0020     case 'Name'
0021       pzm = set(pzm, 'name', char(ch.getTextContent));
0022     case 'Gain'
0023       pzm = set(pzm, 'gain', str2num(char(ch.getTextContent)));
0024     case 'POLE'
0025       ps = [ps xml_read_pole(ch)];
0026     case 'ZERO'
0027       zs = [zs xml_read_zero(ch)];
0028       
0029     otherwise
0030 %       warning('!!! unknown miir field');
0031   end
0032   
0033 end
0034 
0035 pzm = set(pzm, 'poles', ps);
0036 pzm = set(pzm, 'zeros', zs);
0037 
0038 
0039 
0040 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003