Code covered by the BSD License  

Highlights from
CTMSIM - an interactive freeway traffic macrosimulator

image thumbnail
from CTMSIM - an interactive freeway traffic macrosimulator by Alex Kurzhanskiy
Freeway traffic simulation based on Asymmetric Cell Transmission Model

get_cell_list(celldata)
function clst = get_cell_list(celldata)
% GET_CELL_LIST - populate text buffer with cell names.
%
% Call:   clst = get_cell_list(celldata)
%
% Parameter:   celldata - array of freeway cell structures.
%
% Returns:   clst - list of cell names.
%
% Last modified:   07/30/2006.

%
% Alex Kurzhanskiy   <akurzhan@eecs.berkeley.edu>
%

N    = size(celldata, 2);  % number of cells

clst = [];

for i = 1:N
  cll  = sprintf('Cell %d   (%d lanes)', i, celldata(i).lanes);
  clst = strvcat(clst, cll);
end

return;

Contact us at files@mathworks.com