diff --git a/matlab/identification_analysis.m b/matlab/identification_analysis.m index 070698838..f14e74f71 100644 --- a/matlab/identification_analysis.m +++ b/matlab/identification_analysis.m @@ -85,6 +85,9 @@ if info(1)==0, derivatives_info.DYss=dYss; if init, indJJ = (find(max(abs(JJ'),[],1)>1.e-8)); + if isempty(indJJ) && any(any(isnan(JJ))) + error('There are NaN in the JJ matrix. Please check whether your model has units roots and you forgot to set lik_init~=1.' ) + end while length(indJJ)