diff --git a/matlab/extended_path.m b/matlab/extended_path.m index ea4e424cb..73c3cc3ec 100644 --- a/matlab/extended_path.m +++ b/matlab/extended_path.m @@ -124,7 +124,7 @@ while (t<=sample_size) norme INFO end - if isnan(INFO) + if ~isstruct(INFO) && isnan(INFO) t = t-1; new_draw = 0; else diff --git a/matlab/homotopic_steps.m b/matlab/homotopic_steps.m index 22d71d06f..aa798e8fd 100644 --- a/matlab/homotopic_steps.m +++ b/matlab/homotopic_steps.m @@ -45,7 +45,7 @@ end if reduce_step step=step/1.5; [info,number_of_calls] = homotopic_steps(tdx,positive_var_indx,shocks,old_weight,step,init,number_of_calls); - if ~isnan(info) + if isstruct(info) && ~isnan(info.error) time = time+info.time; return else