Skip to content
Snippets Groups Projects
Verified Commit ad98158d authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

initvalf/histvalf: fix typo in error message

[skip ci]
parent 3768271f
No related branches found
No related tags found
No related merge requests found
...@@ -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-2023 Dynare Team % Copyright © 2003-2024 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: FIRST_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: FIRST_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
......
...@@ -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: FIRST_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' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment