LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
saveLinks.m
1function [simElem, simDoc] = saveLinks(self, simElem, simDoc)
2% [SIMELEM, SIMDOC] = SAVELINKS(SIMELEM, SIMDOC)
3
4% Copyright (c) 2012-2026, Imperial College London
5% All rights reserved.
6sn = self.getStruct;
7
8[I,J]=find(sn.connmatrix);
9for k=1:length(I)
10 i=I(k);
11 j=J(k);
12 connectionNode = simDoc.createElement('connection');
13 connectionNode.setAttribute('source', sn.nodenames(i));
14 connectionNode.setAttribute('target', sn.nodenames(j));
15 simElem.appendChild(connectionNode);
16end
17end