i've got an array like x, i want to do some works on it and put result in the new array y. then i should compare this two. if they are the same by a thershold(i.e they could be a little different) that's ok and algorithm ends otherwise i should continue the iteration the problem is comparing these two. they are a two 2d array with unknown elements. i've done two different way but none of them where ok: first way:
d = x - y
if d < 5
disp('end')
end
and so on
but it does not work well,honestly it doesn't work at all
the other way which i used is:
isequal(x,y)
while they are the same it will return 0 but if they are not and even with a little difference the result will be 1 and it is not ok cause as i said algorithm should consider a litlle difference and stop the iteration what should i do?