if find returns empty this ended in a syntax error
parent
9c76b1da51
commit
91d99fe645
|
@ -78,14 +78,15 @@ if ~isempty(param_names)
|
||||||
pidxs = zeros(nparams, 1);
|
pidxs = zeros(nparams, 1);
|
||||||
names = X.name;
|
names = X.name;
|
||||||
for i = 1:nparams
|
for i = 1:nparams
|
||||||
pidxs(i) = find(strcmp(param_names{i}, names));
|
idx = find(strcmp(param_names{i}, names));
|
||||||
if isempty(pidxs(i))
|
if isempty(idx)
|
||||||
if ~isempty(eqtags)
|
if ~isempty(eqtags)
|
||||||
error(['Could not find ' param_names{i} ...
|
error(['Could not find ' param_names{i} ...
|
||||||
' in the equations specified by ' strjoin(eqtags, ',')]);
|
' in the equations specified by ' strjoin(eqtags, ',')]);
|
||||||
end
|
end
|
||||||
error('Couldn''t find parameter in equations');
|
error('Couldn''t find parameter in equations');
|
||||||
end
|
end
|
||||||
|
pidxs(i) = idx;
|
||||||
end
|
end
|
||||||
subcols = setdiff(1:X.vobs, pidxs);
|
subcols = setdiff(1:X.vobs, pidxs);
|
||||||
for i = 1:length(subcols)
|
for i = 1:length(subcols)
|
||||||
|
|
Loading…
Reference in New Issue