%%This program will attempt to fill squares with different colors

figure;
hold on;

for i=1:30
    for j=1:30
        x=[i-1 ; i-1; i ;i  ;i-1];
        y=[j-1 ; j  ; j ;j-1; j-1];
        
        b=fill(x,y,[0,i/30,j/30]);
        axis([0 30 0 30]);
    end
end