Fixed replacement of LHS variable if the equation has no lag.
parent
9b51b1ee16
commit
2256acfa73
|
@ -163,7 +163,11 @@ for i=1:length(objNames)
|
|||
rhs = regexprep(rhs, ['\<' objNames{i} '\>'], sprintf('data(:,%u)', k));
|
||||
end
|
||||
if contains(lhs, objNames{i})
|
||||
lhs = strrep(lhs, objNames{i}, sprintf('data(2:end,%u)', k));
|
||||
if islaggedvariables
|
||||
lhs = strrep(lhs, objNames{i}, sprintf('data(2:end,%u)', k));
|
||||
else
|
||||
lhs = strrep(lhs, objNames{i}, sprintf('data(:,%u)', k));
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue