aggregate.m: compatibility fix for MATLAB R2014a
The importdata function returns empty lines on R2014a, while it omits them in R2020a. Moreover, importdata is not meant to parse arbitrary text file. We thus replace it by repeated calls to fgetl.time-shift
parent
5fc29ace8f
commit
3e98918690
|
@ -63,7 +63,17 @@ eqlist = cell(MAX_NUMBER_OF_ELEMENTS, 4);
|
|||
tagnum = 1;
|
||||
eqnum = 0;
|
||||
for i=1:length(varargin)
|
||||
model = importdata(sprintf('%s/model.inc', varargin{i}));
|
||||
% Store all non-empty lines of model.inc in the “model” cell-array
|
||||
fid = fopen(sprintf('%s/model.inc', varargin{i}));
|
||||
model = {};
|
||||
while ~feof(fid)
|
||||
line = fgetl(fid);
|
||||
if ~isempty(line)
|
||||
model{end+1} = line;
|
||||
end
|
||||
end
|
||||
fclose(fid);
|
||||
|
||||
eqtag = false;
|
||||
for j=1:length(model)
|
||||
if isequationtag(model{j})
|
||||
|
|
Loading…
Reference in New Issue