Long story short, I need to flip my data/reassign the w data to new indices on the y axis and got the indices 394,530. However I am trying to extract the data from ReSHEARLAYERandWAKE2(1).uxux.w (a structured data set containing some w values - say reynolds stresses for each x and y position)
from specific x and y ranges, and yet everytime i am shown an error "Index in position 1 is invalid. Array indices must be positive integers or logical values."
ww = ReSHEARLAYERandWAKE2(1).uxux.w;
wwmirror = ww;
for i = 0:366
for j = 394:530
wwmirror(i,1080 - (j - 394)) = ww(i,j)