Commit 6b4aad50 authored by Sébastien Villemot's avatar Sébastien Villemot

Modernization: use tilde (~) syntax for ignored output arguments

parent 6f26c376
Pipeline #307 passed with stage
in 1 minute and 37 seconds
......@@ -34,7 +34,7 @@ else
lambda = [];
end
[junk, data] = sample_hp_filter(o.data,lambda);
[~, data] = sample_hp_filter(o.data,lambda);
o.data = data;
for i=1:vobs(o)
......
......@@ -43,7 +43,7 @@ end
q = dseries();
[q.name, IBC, junk] = unique([o.name; p.name], 'last');
[q.name, IBC, ~] = unique([o.name; p.name], 'last');
tex = [o.tex; p.tex];
q.tex = tex(IBC);
......
......@@ -120,9 +120,9 @@ switch length(S)
else
Dates = S(1).subs{1};
end
[junk, tdx] = intersect(A.dates.time,Dates.time,'rows');
[~, tdx] = intersect(A.dates.time,Dates.time,'rows');
if isdseries(B)
[junk, tdy] = intersect(B.dates.time,Dates.time,'rows');
[~, tdy] = intersect(B.dates.time,Dates.time,'rows');
if isempty(tdy)
error('dseries::subsasgn: Periods of the dseries objects on the left and right hand sides must intersect!')
end
......@@ -183,9 +183,9 @@ switch length(S)
end
if (isdseries(B) && isequal(vobs(sA), vobs(B))) || (isnumeric(B) && isequal(vobs(sA),columns(B))) || (isnumeric(B) && isequal(columns(B),1))
if isdates(S(2).subs{1})
[junk, tdx] = intersect(sA.dates.time,S(2).subs{1}.time,'rows');
[~, tdx] = intersect(sA.dates.time,S(2).subs{1}.time,'rows');
if isdseries(B)
[junk, tdy] = intersect(B.dates.time,S(2).subs{1}.time,'rows');
[~, tdy] = intersect(B.dates.time,S(2).subs{1}.time,'rows');
if isempty(tdy)
error('dseries::subsasgn: Periods of the dseries objects on the left and right hand sides must intersect!')
end
......
......@@ -228,7 +228,7 @@ switch S(1).type
error(['dseries::subsref: Indices are out of bounds! Subsample cannot end after ' date2string(A.dates(end)) '.'])
end
% Extract a subsample using a dates object
[junk,tdx] = intersect(A.dates.time,Dates.time,'rows');
[~,tdx] = intersect(A.dates.time,Dates.time,'rows');
B = copy(A);
B.data = B.data(tdx,:);
B.dates = B.dates(tdx);
......
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