You can index the entire columns (and randomly change the order using randperm) Amix = A( :, randperm(size(A,2)) ); See an example at ideone....
Well when you combine colors with transparency you should apply the equation: result = alpha * srcColor + (1 - alpha) * dstColor Where srcColor is the color of the element on top and dstColor the color of what is under. In your case the alpha is 100 which is...