weather1618 and whether1623 are two 2D array of size 384x384. Following is my script section for weather1618Modified for which I tried to do a field displacement. If it helps, max_displ has a value of 139.7.
I do not get any error message when I run the script but I also don't get any value for bestDx and bestDy, the variables don't even create, What am I doing wrong?
weather1618Modified = zeros(384,384);
for x = 1:384
for y = 1:384
for Dx = -max_displ:9: max_displ
for Dy = -max_displ:9: max_displ
if x+Dx<1 | y+Dy<1 | x+Dx>384 | y+Dy>384
weather1618Modified(x+Dx,y+Dy) = weather1618(x,y)