diff --git a/src/@dseries/merge.m b/src/@dseries/merge.m index 59ce92e231ae82eee3573dbaa642bef84b359b8f..923fe3afd33fec2ca76b4f0f1614892c374168cc 100644 --- a/src/@dseries/merge.m +++ b/src/@dseries/merge.m @@ -82,11 +82,11 @@ elseif firstdate(o) >= firstdate(p) Z1 = [NaN(diff, vobs(o));o.data]; if nobs(q) > nobs(o) + diff Z1 = [Z1; NaN(nobs(q)-(nobs(o) + diff), vobs(o))]; - end; + end Z2 = p.data; if nobs(q) > nobs(p) Z2 = [Z2; NaN(nobs(q) - nobs(p), vobs(p))]; - end; + end Z = [Z1 Z2]; q.data = Z(:,IBC); q_init = firstdate(p); @@ -101,7 +101,7 @@ else Z2 = o.data; if nobs(q) > nobs(o) Z2 = [Z2; NaN(nobs(q) - nobs(o), vobs(o))]; - end; + end Z = [Z2 Z1]; q.data = Z(:,IBC); q_init = firstdate(o); diff --git a/src/@dseries/plot.m b/src/@dseries/plot.m index ed063de456405c2e4821a5165fdbb3504e705f56..f822e77870e799e1354922ddd51fadfba34ba41f 100644 --- a/src/@dseries/plot.m +++ b/src/@dseries/plot.m @@ -23,7 +23,6 @@ function h = plot(o, varargin) if isequal(nargin,1) ndseries = 1; nvariables = vobs(o); - nobservations = nobs(o); else if isdseries(varargin{1}) ndseries = 2; @@ -41,7 +40,6 @@ else else ndseries = 1; nvariables = vobs(o); - nobservations = nobs(o); end end @@ -50,7 +48,7 @@ switch ndseries if isequal(nvariables,1) hh = plot(o.data,varargin{:}); else - if length(varargin) + if ~isempty(varargin) message = sprintf('dseries::plot: dseries object %s has %d>1 variables but you passed additional arguments to the plot function.\n These additional arguments won''t ne interpreted. Use the Matlab/Octave set command and the plot\n handle instead if you wish to modify the properties of the plotted time series.',inputname(1),nvariables); warning(message) end