Added the possibility to change more than one variable name in an equation.
parent
d136be8a84
commit
0aa78c6914
|
@ -89,7 +89,9 @@ for i=1:length(eqtags)
|
|||
if isrename
|
||||
[variable_has_to_be_renamed, id] = ismember(eqnum, [rename{:,1}]);
|
||||
if variable_has_to_be_renamed
|
||||
tmp = strsplit(rename{id,2}, '->');
|
||||
TMP = strsplit(rename{id,2}, ',');
|
||||
for j=1:length(TMP)
|
||||
tmp = strsplit(TMP{j}, '->');
|
||||
lhs_expression = exactstrrep(lhs_expression, tmp{1}, tmp{2});
|
||||
RHS = exactstrrep(RHS, tmp{1}, tmp{2});
|
||||
rep = strcmp(tmp{1}, enames);
|
||||
|
@ -102,6 +104,7 @@ for i=1:length(eqtags)
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
% Remove residual from equation if required.
|
||||
if noresids
|
||||
exogenous_variables_to_be_removed = ~ismember(xnames, M_.simulation_exo_names);
|
||||
|
|
Loading…
Reference in New Issue