clear
N = 5; %number of car types
tmax = 10;
w = zeros(5); % a square zero matrix
for k=1:N
x = rand(N,1);
x = x/sum(x); %normalization of columns
w(:,k) = x;
end
p = rand(5,1);
p = p/sum(p); %initial car distribution
tr = p;
for k=1:tmax
    p = w*p;
    tr = [tr p];
end %what happens in the loop ?
plot(tr');
hold on
plot(tr','*');
hold off %not (yet) a good plot.