time-shift
Houtan Bastani 2017-06-27 11:24:35 +02:00
parent e99d899d47
commit c71ae37670
1 changed files with 2 additions and 2 deletions

View File

@ -46,12 +46,12 @@ jsonmodel = jsonmodel.model;
% replace variables with dseriesdata.variablename
for i = 1:length(dseriesdata.name)
rhs = regexprep(rhs, ['([\s\+\-\*\/]{1}|^)(' dseriesdata{i}.name{:} ')([\s\(\+\-\*\/|$]{1})'], '$1dseriesdata.$2$3');
rhs = regexprep(rhs, ['([\s\+\-\*\/\^]{1}|^)(' dseriesdata{i}.name{:} ')([\s\(\+\-\*\/\^|$]{1})'], '$1dseriesdata.$2$3');
end
fields = fieldnames(params);
for i = 1:length(fields)
rhs = regexprep(rhs, ['([\s\+\-\\/]{1}|^)(' fields{i} ')([\s\+\-\*\/]{1}|$)'], '$1params.$2$3');
rhs = regexprep(rhs, ['([\s\+\-\*\/\^]{1}|^)(' fields{i} ')([\s\+\-\*\/\^]{1}|$)'], '$1params.$2$3');
end
% call function with all variable values