elegant algorithm

Nov 07, 2007 13:51

spacing = ( ( length / nveh ) / cell );
for i = 1:spacing:numcells
here = round(i);
roadway(here) = 1;
speeds(here) = floor(min(4,length/cell/nveh));
end

Leave a comment

Comments 1

seven_am November 8 2007, 19:38:11 UTC
remember this:

you + me = calculus

you've come a long way from that!!

:)

Reply


Leave a comment

Up