but 0.00102504692433755 is less than sqrt(1.20641569956672e-05) which is approximately 0.003 . The condition is met.
My guess, based upon the comment in the code, is that you want
unk_row = 6
for it_cnt = 1:20
unk_cnt = 1:unk_row
if all((abs(del_hat_cal(unk_cnt,1))) < sqrt(C_x_hat(unk_cnt,unk_cnt)))
del_hat_cal = del_hat_cal
else IterationSubscript_1_2
end
disp ('Iterations')
disp(it_cnt)
end
Best Answer