From the below "for loops" in Matlab, I want to extract 150 matrices of "Rules" (each with dimension 1200*5) whereas "Data" has 1200*5 dimension, "Var1C" 150*5 and "Var2C" has 150*5 dimension. Thanks.
for i = 1:150,
    for j=1:5,
        for i1=1:1200,
            if Var1C(i,j)==1 & Data(i1,j)<Var2C(i,j) | Var1C(i,j)==2 & Data(i1,j)>=Var2C(i,j)
               Rules = 0;
            else
               Rules = 1;
            end
        end
    end
end
 
     
     
    