Mercurial > hg > ltpda
comparison m-toolbox/classes/@parfrac/attachToDom.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 function collectedHist = attachToDom(objs, dom, parent, collectedHist) | |
3 | |
4 if isempty(objs) | |
5 | |
6 % Create empty parfrac node with the attribute 'shape' | |
7 utils.xml.attachEmptyObjectNode(objs, dom, parent); | |
8 | |
9 else | |
10 for oo = 1:numel(objs) | |
11 obj = objs(oo); | |
12 | |
13 % Create object node | |
14 parfracNode = dom.createElement('parfrac'); | |
15 parfracNode.setAttribute('shape', sprintf('%dx%d', size(objs))); | |
16 | |
17 % Call superclass | |
18 collectedHist = attachToDom@ltpda_tf(obj, dom, parfracNode, collectedHist); | |
19 | |
20 % Add res | |
21 resNode = dom.createElement('res'); | |
22 utils.xml.attachNumberToDom(obj.res, dom, resNode) | |
23 parfracNode.appendChild(resNode); | |
24 | |
25 % Add poles | |
26 polesNode = dom.createElement('poles'); | |
27 utils.xml.attachNumberToDom(obj.poles, dom, polesNode) | |
28 parfracNode.appendChild(polesNode); | |
29 | |
30 % Add pmul | |
31 pmulNode = dom.createElement('pmul'); | |
32 utils.xml.attachNumberToDom(obj.pmul, dom, pmulNode) | |
33 parfracNode.appendChild(pmulNode); | |
34 | |
35 % Add dir | |
36 dirNode = dom.createElement('dir'); | |
37 utils.xml.attachNumberToDom(obj.dir, dom, dirNode) | |
38 parfracNode.appendChild(dirNode); | |
39 | |
40 % Add to parent node | |
41 parent.appendChild(parfracNode); | |
42 | |
43 end | |
44 end | |
45 | |
46 end |