change indexing into X.name
parent
7632c4f071
commit
99d770382b
|
@ -67,8 +67,9 @@ if ~isempty(param_names)
|
||||||
newX = dseries();
|
newX = dseries();
|
||||||
nparams = length(param_names);
|
nparams = length(param_names);
|
||||||
pidxs = zeros(nparams, 1);
|
pidxs = zeros(nparams, 1);
|
||||||
|
names = X.name;
|
||||||
for i = 1:nparams
|
for i = 1:nparams
|
||||||
idx = find(strcmp(param_names{i}, X.name));
|
idx = find(strcmp(param_names{i}, names));
|
||||||
if isempty(idx)
|
if isempty(idx)
|
||||||
if ~isempty(eqtags)
|
if ~isempty(eqtags)
|
||||||
error(['Could not find ' param_names{i} ...
|
error(['Could not find ' param_names{i} ...
|
||||||
|
@ -77,11 +78,11 @@ if ~isempty(param_names)
|
||||||
error('Unspecified error. Please report');
|
error('Unspecified error. Please report');
|
||||||
end
|
end
|
||||||
pidxs(i) = idx;
|
pidxs(i) = idx;
|
||||||
newX = [newX X.(X.name{idx})];
|
newX = [newX X.(names{idx})];
|
||||||
end
|
end
|
||||||
subcols = setdiff(1:X.vobs, pidxs);
|
subcols = setdiff(1:X.vobs, pidxs);
|
||||||
for i = length(subcols):-1:1
|
for i = length(subcols):-1:1
|
||||||
Y = Y - M_.params(strcmp(X.name{subcols(i)}, M_.param_names))*X.(X.name{subcols(i)});
|
Y = Y - M_.params(strcmp(names{subcols(i)}, M_.param_names))*X.(names{subcols(i)});
|
||||||
end
|
end
|
||||||
X = newX;
|
X = newX;
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue