dyn_ols: take care of trailing underscore when LHS var ends with )

time-shift
Houtan Bastani 2018-01-16 16:33:15 +01:00
parent f01210085f
commit d5ace05281
1 changed files with 5 additions and 1 deletions

View File

@ -181,7 +181,11 @@ for i = 1:length(lhs)
end
% Yhat
lhsrep = regexprep(lhs{i}, '[\(\)\-+\*/]', '_');
lhsrep = lhs{i};
if lhsrep(end) == ')'
lhsrep = lhsrep(1:end-1);
end
lhsrep = regexprep(lhsrep, '[\(\)\-+\*/]', '_');
yhatname = [lhsrep '_FIT'];
if ~isempty(fitted_names_dict)
idx = strcmp(fitted_names_dict(:,1), lhsrep);