Livejournal
Log in
Post
Friends
My journal
autumninjersey
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
Read comments 1
Previous post
Next post
Up