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
|
norme
|
||||||
INFO
|
INFO
|
||||||
end
|
end
|
||||||
if isnan(INFO)
|
if ~isstruct(INFO) && isnan(INFO)
|
||||||
t = t-1;
|
t = t-1;
|
||||||
new_draw = 0;
|
new_draw = 0;
|
||||||
else
|
else
|
||||||
|
|
|
@ -45,7 +45,7 @@ end
|
||||||
if reduce_step
|
if reduce_step
|
||||||
step=step/1.5;
|
step=step/1.5;
|
||||||
[info,number_of_calls] = homotopic_steps(tdx,positive_var_indx,shocks,old_weight,step,init,number_of_calls);
|
[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;
|
time = time+info.time;
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue