Reverted buggy commit 5366dd5cb9f546809ff21a0bd23a2ac423aac6ce by Ferhat and added call to strtrim in @dynSeries/extract method to remove leading and trailing white spaces in variable names.

time-shift
Stéphane Adjemian (Charybdis) 2013-06-17 15:56:54 +02:00
parent 58b6a7676b
commit d23cd52752
2 changed files with 2 additions and 3 deletions

View File

@ -106,6 +106,8 @@ for i=1:nargin-1
error('dynSeries::extract: Cannot handle more than two regular expressions!')
end
end
% Remove trailing white spaces if any
VariableName_ = strtrim(VariableName_);
end
% Get indices of the selected variables

View File

@ -145,9 +145,6 @@ switch S(1).type
error('dynSeries::subsref: I have no idea of what you are trying to do!')
end
case '{}'
if ischar(S(1).subs{1})
S(1).subs = strtrim(mat2cell(S(1).subs{1}, ones(1, size(S(1).subs{1},1)), size(S(1).subs{1},2)));
end
if iscellofchar(S(1).subs)
B = extract(A,S(1).subs{:});
elseif isequal(length(S(1).subs),1) && all(isint(S(1).subs{1}))