diff --git a/matlab/evaluate_steady_state.m b/matlab/evaluate_steady_state.m
index 3b4499ba0c2f1a7065bfdec51a7692afa8eb2e42..93e57ed27fc27a29e7920b66617b416dc1b4784a 100644
--- a/matlab/evaluate_steady_state.m
+++ b/matlab/evaluate_steady_state.m
@@ -233,9 +233,10 @@ function [ys,params,info] = evaluate_steady_state(ys_init,M,options,oo,steadysta
                           M.orig_endo_nbr,...
                           static_model);
                 [infrow,infcol]=find(isinf(fjac) | isnan(fjac));
-                fprintf('\nSTEADY:  The Jacobian at the initial values contains Inf or NaN. The problem arises from: \n')
-                display_problematic_vars_Jacobian(infrow,infcol,M,ys_init,'static','STEADY: ')
-                
+                if ~isempty(infrow)
+                    fprintf('\nSTEADY:  The Jacobian at the initial values contains Inf or NaN. The problem arises from: \n')
+                    display_problematic_vars_Jacobian(infrow,infcol,M,ys_init,'static','STEADY: ')
+                end
                 problematic_equation = find(~isfinite(fvec));                
                 if ~isempty(problematic_equation)
                     fprintf('\nSTEADY:  numerical initial values or parameters incompatible with the following equations\n')