Small cosmetic/efficiency changes.

(cherry picked from commit 4832c0dd)
parent 62d86161
......@@ -48,8 +48,8 @@ switch length(S)
error('dseries::subsasgn: (MATLAB/Octave''s regular expressions) Check opening and closing square brackets!')
end
% Loops and regular expressions are not compatible
if length(idArobase) && length(idBracket.open)
error(['dseries::subsasgn: You cannot use implicit loops and regular expressions in the same rule!'])
if ~isempty(idArobase) && ~isempty(idBracket.open)
error('dseries::subsasgn: You cannot use implicit loops and regular expressions in the same rule!')
end
if ~isempty(idArobase)
elements = build_list_of_variables_with_loops({}, idArobase, element, {});
......@@ -76,7 +76,7 @@ switch length(S)
id = find(strcmp(S(1).subs{i},A.name));
if isempty(id)
% Add a new variable a change its name.
B.name(i) = {S(1).subs{i}};
B.name(i) = S(1).subs(i);
B.tex(i) = {name2tex(S(1).subs{i})};
else
% Rename variable and change its content.
......@@ -152,7 +152,7 @@ switch length(S)
A.tex = name2tex(A.name);
if isempty(A.dates)
if isempty(A.dates.freq)
init = dates('1Y')
init = dates('1Y');
else
init = dates(A.dates.freq, 1, 1);
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment