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
Johannes Pfeifer
dynare
Commits
ad98158d
Verified
Commit
ad98158d
authored
5 months ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
initvalf/histvalf: fix typo in error message
[skip ci]
parent
3768271f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/histvalf_initvalf.m
+3
-3
3 additions, 3 deletions
matlab/histvalf_initvalf.m
tests/histval_initval_file_unit_tests.m
+1
-1
1 addition, 1 deletion
tests/histval_initval_file_unit_tests.m
with
4 additions
and
4 deletions
matlab/histvalf_initvalf.m
+
3
−
3
View file @
ad98158d
...
@@ -11,7 +11,7 @@ function [series, p] = histvalf_initvalf(caller, M_, options)
...
@@ -11,7 +11,7 @@ function [series, p] = histvalf_initvalf(caller, M_, options)
% - series [dseries] selected data from a file or a dseries
% - series [dseries] selected data from a file or a dseries
% - p [integer] number of periods (excluding the initial and terminal conditions)
% - p [integer] number of periods (excluding the initial and terminal conditions)
% Copyright © 2003-202
3
Dynare Team
% Copyright © 2003-202
4
Dynare Team
%
%
% This file is part of Dynare.
% This file is part of Dynare.
%
%
...
@@ -192,7 +192,7 @@ if isfield(options, 'last_obs')
...
@@ -192,7 +192,7 @@ if isfield(options, 'last_obs')
error
(
'%s_FILE: last_obs = %d is larger than the number of observations in the dataset (%d)'
,
caller
,
options
.
last_obs
,
nobs0
)
error
(
'%s_FILE: last_obs = %d is larger than the number of observations in the dataset (%d)'
,
caller
,
options
.
last_obs
,
nobs0
)
elseif
first_obs_ispresent
elseif
first_obs_ispresent
if
nobs
>
0
&&
(
periods
(
options
.
last_obs
)
~=
first_obs
+
nobs
-
1
)
if
nobs
>
0
&&
(
periods
(
options
.
last_obs
)
~=
first_obs
+
nobs
-
1
)
error
(
'%s_FILE: FIST_OBS, LAST_OBS and NOBS contain inconsistent information. Use only two of these options.'
,
caller
)
error
(
'%s_FILE: FI
R
ST_OBS, LAST_OBS and NOBS contain inconsistent information. Use only two of these options.'
,
caller
)
else
else
last_obs
=
periods
(
options
.
last_obs
);
last_obs
=
periods
(
options
.
last_obs
);
end
end
...
@@ -209,7 +209,7 @@ elseif isfield(options, 'lastobs')
...
@@ -209,7 +209,7 @@ elseif isfield(options, 'lastobs')
error
(
'%s_FILE: last_obs = %s is larger than the number of observations in the dataset (%s)'
,
caller
,
options
.
lastobs
,
series
.
last
)
error
(
'%s_FILE: last_obs = %s is larger than the number of observations in the dataset (%s)'
,
caller
,
options
.
lastobs
,
series
.
last
)
elseif
first_obs_ispresent
elseif
first_obs_ispresent
if
nobs
>
0
&&
(
options
.
lastobs
~=
first_obs
+
nobs
-
1
)
if
nobs
>
0
&&
(
options
.
lastobs
~=
first_obs
+
nobs
-
1
)
error
(
'%s_FILE: FIST_OBS, LAST_OBS and NOBS contain inconsistent information. Use only two of these options.'
,
caller
)
error
(
'%s_FILE: FI
R
ST_OBS, LAST_OBS and NOBS contain inconsistent information. Use only two of these options.'
,
caller
)
else
else
last_obs
=
options
.
lastobs
;
last_obs
=
options
.
lastobs
;
end
end
...
...
This diff is collapsed.
Click to expand it.
tests/histval_initval_file_unit_tests.m
+
1
−
1
View file @
ad98158d
...
@@ -84,7 +84,7 @@ try
...
@@ -84,7 +84,7 @@ try
ds1
=
histvalf_initvalf
(
caller
,
M
,
options
);
ds1
=
histvalf_initvalf
(
caller
,
M
,
options
);
error
(
'This test didn
''
t catch the error'
)
error
(
'This test didn
''
t catch the error'
)
catch
me
catch
me
if
~
strcmp
(
me
.
message
,
strcat
(
'INITVAL_FILE: FIST_OBS, LAST_OBS and NOBS contain'
,
...
if
~
strcmp
(
me
.
message
,
strcat
(
'INITVAL_FILE: FI
R
ST_OBS, LAST_OBS and NOBS contain'
,
...
' inconsistent information. Use only two of these'
,
...
' inconsistent information. Use only two of these'
,
...
' options.'
))
' options.'
))
failed_tests
=
cat
(
1
,
failed_tests
,
'Wrong nobs error message'
);
failed_tests
=
cat
(
1
,
failed_tests
,
'Wrong nobs error message'
);
...
...
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