Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/io/readYAMLmodel.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
0045 <span class="comment">% leading spaces to avoid metaData to be concatenated.</span>
0046 newLine=regexp(line_raw,<span class="string">'^ {6,}([\w\(\)].*)'</span>,<span class="string">'tokenExtents'</span>);
0047 brokenLine=find(~cellfun(<span class="string">'isempty'</span>,newLine));
0048 <span class="keyword">for</span> i=1:numel(brokenLine)
0048 <span class="keyword">for</span> i=flip(1:numel(brokenLine))
0049 extraLine = char(line_raw(brokenLine(i)));
0050 extraLine = extraLine(newLine{brokenLine(i)}{1}(1):end);
0051 line_raw{brokenLine(i)-1} = strjoin({line_raw{brokenLine(i)-1},extraLine},<span class="string">' '</span>);
Expand All @@ -115,7 +115,7 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
0058 line_value = regexprep(line_raw, <span class="string">'.*:$'</span>,<span class="string">''</span>);
0059 line_value = regexprep(line_value, <span class="string">'[^&quot;:]+: &quot;?(.+)&quot;?$'</span>,<span class="string">'$1'</span>);
0060 line_value = regexprep(line_value, <span class="string">'(&quot;)|(^ {4,}- )'</span>,<span class="string">''</span>);
0061
0061 line_value(strcmp(line_value,<span class="string">''''''</span>)) = {<span class="string">''</span>};
0062 line_value(strcmp(line_value,line_raw)) = {<span class="string">''</span>};
0063
0064 modelFields = {<span class="string">'id'</span>,char();<span class="keyword">...</span>
Expand Down Expand Up @@ -197,7 +197,7 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
0140 geneMiriams=cell(100000,3); genMirNo=1;
0141 subSystems=cell(100000,2); subSysNo=1;
0142 eccodes=cell(100000,2); ecCodeNo=1;
0143 equations=cell(100000,3); equatiNo=1;
0143 equations=cell(100000,3); equatiNo=1;
0144
0145 <span class="keyword">for</span> i=1:numel(line_key)
0146 tline_raw = line_raw{i};
Expand Down
6 changes: 3 additions & 3 deletions io/readYAMLmodel.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
% leading spaces to avoid metaData to be concatenated.
newLine=regexp(line_raw,'^ {6,}([\w\(\)].*)','tokenExtents');
brokenLine=find(~cellfun('isempty',newLine));
for i=1:numel(brokenLine)
for i=flip(1:numel(brokenLine))
extraLine = char(line_raw(brokenLine(i)));
extraLine = extraLine(newLine{brokenLine(i)}{1}(1):end);
line_raw{brokenLine(i)-1} = strjoin({line_raw{brokenLine(i)-1},extraLine},' ');
Expand All @@ -58,7 +58,7 @@
line_value = regexprep(line_raw, '.*:$','');
line_value = regexprep(line_value, '[^":]+: "?(.+)"?$','$1');
line_value = regexprep(line_value, '(")|(^ {4,}- )','');

line_value(strcmp(line_value,'''''')) = {''};
line_value(strcmp(line_value,line_raw)) = {''};

modelFields = {'id',char();...
Expand Down Expand Up @@ -140,7 +140,7 @@
geneMiriams=cell(100000,3); genMirNo=1;
subSystems=cell(100000,2); subSysNo=1;
eccodes=cell(100000,2); ecCodeNo=1;
equations=cell(100000,3); equatiNo=1;
equations=cell(100000,3); equatiNo=1;

for i=1:numel(line_key)
tline_raw = line_raw{i};
Expand Down
Loading