Skip to content
Snippets Groups Projects
Commit fd49f682 authored by FerhatMihoubi's avatar FerhatMihoubi
Browse files

Allow for NAN in the first argument

parent 6ef181d1
Branches
No related tags found
1 merge request!13Allow for NAN in the first argument
......@@ -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,10 +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!')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment