if (oval1x ~= sObjVal1(1) || oval1x ~= sObjVal1(end)) cd=1;else cd=Inf;end
it happened that oval1x=4.2139; and sObjVal1(1)=4.2139; but the loop did not work correctly
Edit: is there a way to correct this issue?
errorfloating pointif statementloop
if (oval1x ~= sObjVal1(1) || oval1x ~= sObjVal1(end)) cd=1;else cd=Inf;end
Best Answer