1
2
3
4
5
6
7
8
9
10
11
12
13
|
## -*-octave-*-
function write_ibg(system_name,bonds);
fid = fopen([system_name,"_ibg.m"], "wt");
[nbonds, junk] = size(struct_elements(bonds));
format_hc = " %s.bonds.bond%i.head.component\t= \"%s\";\n";
format_tc = " %s.bonds.bond%i.tail.component\t= \"%s\";\n";
format_hp = " %s.bonds.bond%i.head.ports\t= \"%s\";\n";
format_tp = " %s.bonds.bond%i.tail.ports\t= \"%s\";\n";
format_ce = " %s.bonds.bond%i.causality.effort\t= \"%s\";\n";
format_cf = " %s.bonds.bond%i.causality.flow\t= \"%s\";\n";
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
## -*-octave-*-
function write_ibg(system_name,bonds);
fid = fopen([system_name,"_ibg.m"], "wt");
[nbonds, junk] = size(fieldnames(bonds));
format_hc = " %s.bonds.bond%i.head.component\t= \"%s\";\n";
format_tc = " %s.bonds.bond%i.tail.component\t= \"%s\";\n";
format_hp = " %s.bonds.bond%i.head.ports\t= \"%s\";\n";
format_tp = " %s.bonds.bond%i.tail.ports\t= \"%s\";\n";
format_ce = " %s.bonds.bond%i.causality.effort\t= \"%s\";\n";
format_cf = " %s.bonds.bond%i.causality.flow\t= \"%s\";\n";
|