Commit fdef5e75 authored by Stéphane Adjemian's avatar Stéphane Adjemian

Merge pull request #14 from FerhatMihoubi/master

Allow for NAN in the first argument
parents 8b0a5f4f 65dcc1b2
......@@ -30,10 +30,6 @@ function B = cumprod(varargin) % --*-- Unitary tests --*--
% Get indices of the columns without NaNs
idx = find(~any(isnan(varargin{1}.data)));
if isempty(idx)
error('dseries::cumprod: All the variables have NaNs. The cumulated product cannot be computed!')
end
if ~isequal(idx(:),transpose(1:vobs(varargin{1})))
warning('dseries::cumprod: The cumulated product is not computed for some variables because they have NaNs!')
end
......
......@@ -30,9 +30,6 @@ function B = cumsum(varargin) % --*-- Unitary tests --*--
% Get indices of the columns without NaNs
idx = find(~any(isnan(varargin{1}.data)));
if isempty(idx)
error('dseries::cumsum: All the variables have NaNs. The cumulated sum cannot be computed!')
end
if ~isequal(idx(:),transpose(1:vobs(varargin{1})))
warning('dseries::cumsum: The cumulated sum is not computed for some variables because they have NaNs!')
......
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