How do I find minimum for the first loop?  ii is the minimum value for each iteration while running jj. I want the local minimum and global minimum values. 
How could I use vectorization to make the same above operation work?
clear all, clc
p = 1;
for ii=1:5
    q = 1;
    for jj = 0.1:0.1:0.5
        x1 = 2*jj;
        x  = x1+ii;
        X1(p) = x;
        X2 = min(X1);         
        y  = min(X2);
        p = p+1;
        q = q+1;
    end
end
 
     
    