Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
Dynare
dynare
Commits
1914be92
Commit
1914be92
authored
11 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Check that the initial and terminal dates are in the ranges of the
dseries objects involved in the recursive expression.
parent
de349c4f
Branches
Branches containing commit
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
+10
-3
10 additions, 3 deletions
matlab/utilities/dseries/from.m
with
10 additions
and
3 deletions
matlab/utilities/dseries/from.m
+
10
−
3
View file @
1914be92
...
...
@@ -73,16 +73,23 @@ end
% Remove duplicates.
variables
=
unique
(
variables
);
% Test that all the involved variables are available dseries objects.
% 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.
for
i
=
1
:
length
(
variables
)
try
var
=
evalin
(
'caller'
,
variables
{
i
});
catch
error
([
'Variable '
variables
{
i
}
' is unknown!'
])
error
([
'
dseries::from:
Variable '
variables
{
i
}
' is unknown!'
])
end
if
~
isdseries
(
var
)
error
([
'Variable '
variables
{
i
}
' is not a dseries object!'
])
error
([
'
dseries::from:
Variable '
variables
{
i
}
' is not a dseries object!'
])
else
if
d1
<
var
.
dates
(
1
)
error
(
sprintf
(
'dseries::from: First date in variable %s is posterior to %s!\n Check the initial date of the loop.'
,
variables
{
i
},
char
(
d1
)))
end
if
d2
>
var
.
dates
(
end
)
error
(
sprintf
(
'dseries::from: Last date in variable %s is anterior to %s!\n Check the terminal date of the loop.'
,
variables
{
i
},
char
(
d2
)))
end
eval
(
sprintf
(
'%s = var;'
,
variables
{
i
}));
end
end
...
...
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