Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dynare
dseries
Commits
65dcc1b2
Commit
65dcc1b2
authored
Dec 23, 2015
by
FerhatMihoubi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for NAN in the first argument
parent
8b0a5f4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
7 deletions
+0
-7
src/@dseries/cumprod.m
src/@dseries/cumprod.m
+0
-4
src/@dseries/cumsum.m
src/@dseries/cumsum.m
+0
-3
No files found.
src/@dseries/cumprod.m
View file @
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
...
...
src/@dseries/cumsum.m
View file @
65dcc1b2
...
...
@@ -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!'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment