diff --git a/matlab/histvalf_initvalf.m b/matlab/histvalf_initvalf.m index 7885ac4e82c30aa3bd1e095a03a022fe1bceb5f7..b9727f86eb7ec8a31c11ef7ab159311137a758db 100644 --- a/matlab/histvalf_initvalf.m +++ b/matlab/histvalf_initvalf.m @@ -11,7 +11,7 @@ function [series, p] = histvalf_initvalf(caller, M_, options) % - series [dseries] selected data from a file or a dseries % - 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. % @@ -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) elseif first_obs_ispresent 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 last_obs = periods(options.last_obs); end @@ -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) elseif first_obs_ispresent 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 last_obs = options.lastobs; end diff --git a/tests/histval_initval_file_unit_tests.m b/tests/histval_initval_file_unit_tests.m index 80d2f58ee40185deda6afbf220f6dedff5fe0326..6539ed02e32fa9c78d1b1f131912562207ab5c6a 100644 --- a/tests/histval_initval_file_unit_tests.m +++ b/tests/histval_initval_file_unit_tests.m @@ -84,7 +84,7 @@ try ds1 = histvalf_initvalf(caller, M, options); error('This test didn''t catch the error') 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', ... ' options.')) failed_tests = cat(1, failed_tests, 'Wrong nobs error message' );