The normal loop is
for i=1:50
end
but I want to execute the loop through certain integers in 4 different array simultaneously and in the order that I specify. So in the first loop, Matlab would take the first integer from r1, r2, c1, c2. Then for the second loop, Matlab would take the second integer from r1, r2, c1, c2.
For r1 = [1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128];
r2 = [1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148];
c1 = [776, 776 + 1280, 776 + 1280*2, 776 + 1280*3, 776 + 1280*3 + 994, 776 + 1280*4 + 994, 776 + 1280*5 + 994, 776 + 1280*6 + 994, 776 + 1280*7 + 994];
c2 = [792, 792 + 1280, 792 + 1280*2, 792 + 1280*3, 792 + 1280*3 + 994, 792 + 1280*4 + 994, 792 + 1280*5 + 994, 792 + 1280*6 + 994, 792 + 1280*7 + 994];
a1_raw = imread('T:\SST\...\pinhole_1-8_6s', 'PixelRegion', {[r1, r2], [c1, c2]});
End
Also, I'd like a1_raw to change every time the loop loops so that at the end of the loop I should have 8 different "a1_raws". How can I do that in MATLAB?
use a single index for all arrays