MATLAB: Simultanious for loop (two variables)

simultanious loop

How do I make j = 1 when i = 2 and j = 2 when i = 3 in the loop below (that does not do this)?
a = rand(1,2);
b=rand(2,3);
myColorMap = lines(length(a));
for i = 2:3;
for j= 1:length(a);
hold on
plot(b(:,i), 'color', myColorMap((j), :));
end
end

Best Answer

a = rand(1,2);
b = rand(2,3);
myColorMap = lines(length(a));
s = size(b);
for jj = 1:length(a);
hold on
plot(b(:,s(jj)), 'color', myColorMap(jj, :));
end