diff --git a/matlab/estimation/check_prior_analysis_data.m b/matlab/estimation/check_prior_analysis_data.m
index 73ed707d3b4b5859abf30821a03b04c976f2e882..569f324d22e6cf840889c56b7dc328c8b0b86130 100644
--- a/matlab/estimation/check_prior_analysis_data.m
+++ b/matlab/estimation/check_prior_analysis_data.m
@@ -83,7 +83,7 @@ switch type
   case 'conditional decomposition'
     generic_prior_data_file_name = 'PriorConditionalVarianceDecomposition';
   otherwise
-    disp(['This feature is not yet implemented!'])
+    disp('This feature is not yet implemented!')
 end
 CheckPath('prior/moments',M_.dname);
 pdfinfo = dir([ M_.dname '/prior/' generic_prior_data_file_name '*']);
@@ -95,8 +95,7 @@ if isempty(pdfinfo)
     return
 else
     number_of_the_last_prior_data_file = length(pdfinfo);
-    name_of_the_last_prior_data_file = pdinfo(end).name;
-    pdfdate = pdinfo(end).datenum;
+    pdfdate = pdinfo(number_of_the_last_prior_data_file).datenum;
     % /!\ REMARK /!\
     % The user can change the model or the value of a calibrated
     % parameter without changing the prior. In this case the (prior)
@@ -112,4 +111,4 @@ else
             description = 'prior data files are up to date.';
         end
     end
-end
\ No newline at end of file
+end