Bug fix. Variables INFO or info may be matlab's structure (isnan cannot be applied on a structure).
parent
f85b47e6ed
commit
f25371bf6a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue