I have this If statement
if abs(DespSubSis(1) - Carga(1)) > abs(PTIE) k = k + 1; flag = 1;elseif abs(DespSubSis(2) - Carga(2)) > abs(PTIE) k = k + 1; flag = 1;end
being
DespSubSis = 700.0000 700.0000Carga = 850 550PTIE = 150
The first If returns 0, but the second 1.
Both should returns 0 since It's false 150 > 150.
What's wrong? 🙁
Best Answer