Do not issue an error message if the dseries appearing in the recursive/static expression do have common names.
parent
744bb91c78
commit
a5ea76d58c
|
@ -219,10 +219,10 @@ for i=1:number_of_variables
|
||||||
end
|
end
|
||||||
if i>1
|
if i>1
|
||||||
if ismember(var.name,variable_names)
|
if ismember(var.name,variable_names)
|
||||||
error('dseries::from: All the dseries objects should contain variables with different names!')
|
% Locally change variable name.
|
||||||
else
|
var = var.rename(var.name{1},get_random_string(20));
|
||||||
variable_names(i) = {var.name{1}};
|
|
||||||
end
|
end
|
||||||
|
variable_names(i) = {var.name{1}};
|
||||||
else
|
else
|
||||||
variable_names(i) = {var.name{1}};
|
variable_names(i) = {var.name{1}};
|
||||||
end
|
end
|
||||||
|
@ -244,7 +244,7 @@ for i=1:number_of_variables
|
||||||
eval(sprintf('%s = var;',current_variable));
|
eval(sprintf('%s = var;',current_variable));
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
variable_names
|
||||||
% Get the name of the assigned variable (with time index)
|
% Get the name of the assigned variable (with time index)
|
||||||
assignedvariablename = regexpi(EXPRESSION(1:equal_id-1), '\w*\(t\)|\w*\(t\-\d\)|\w*\(t\+\d\)|\w*\.\w*\(t\)|\w*\.\w*\(t\-\d\)|\w*\.\w*\(t\+\d\)','match');
|
assignedvariablename = regexpi(EXPRESSION(1:equal_id-1), '\w*\(t\)|\w*\(t\-\d\)|\w*\(t\+\d\)|\w*\.\w*\(t\)|\w*\.\w*\(t\-\d\)|\w*\.\w*\(t\+\d\)','match');
|
||||||
if isempty(assignedvariablename)
|
if isempty(assignedvariablename)
|
||||||
|
|
Loading…
Reference in New Issue