Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Ratto
dynare
Commits
74245613
Commit
74245613
authored
10 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Test that each dseries object contains only one variable.
parent
6106b951
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/utilities/dseries/from.m
+5
-1
5 additions, 1 deletion
matlab/utilities/dseries/from.m
with
5 additions
and
1 deletion
matlab/utilities/dseries/from.m
+
5
−
1
View file @
74245613
...
...
@@ -143,7 +143,7 @@ number_of_variables = size(leadlagtable,1);
% Test that all the involved variables are available dseries objects. Also check that
% these time series are defined over the time range given by d1 and d2 (taking care of
% the lags and leads)
.
% the lags and leads)
and check that each object is a singleton
for
i
=
1
:
number_of_variables
current_variable
=
leadlagtable
{
i
,
1
};
try
...
...
@@ -154,6 +154,10 @@ for i=1:number_of_variables
if
~
isdseries
(
var
)
error
([
'dseries::from: Variable '
current_variable
' is not a dseries object!'
])
else
if
var
.
vobs
>
1
msg
=
sprintf
(
'dseries::from: Object %s must contain only one variable!\n'
,
current_variable
);
error
(
msg
)
end
if
d1
<
var
.
dates
(
1
)
+
leadlagtable
{
i
,
2
}
msg
=
sprintf
(
'dseries::from: Initial date of the loop (%s) is inconsistent with %s
''
s range!\n'
,
char
(
d1
),
current_variable
);
msg
=
[
msg
,
sprintf
(
' Initial date should be greater than or equal to %s.'
,
char
(
var
.
dates
(
1
)
+
leadlagtable
{
i
,
2
}))];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment