From ad98158dbe815a257bdc650afadfdf3e4c68e5b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Mon, 4 Nov 2024 19:11:14 +0100
Subject: [PATCH] initvalf/histvalf: fix typo in error message

[skip ci]
---
 matlab/histvalf_initvalf.m              | 6 +++---
 tests/histval_initval_file_unit_tests.m | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/matlab/histvalf_initvalf.m b/matlab/histvalf_initvalf.m
index 7885ac4e8..b9727f86e 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 80d2f58ee..6539ed02e 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' );
-- 
GitLab