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

dfltGUIclose()
function dfltGUIclose()
% DFLTGUICLOSE - saves data if necessary, performs cleanup and closes 'dfltGUI' window;
%                this function neither takes nor returns any parameters.
%
% Last modified:   11/17/2006.

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

global g_fwcfg;
global g_dfltGUI;

if g_dfltGUI.OK == 1  % save data in 'g_fwcfg' data structure
  g_fwcfg.defaultCell = g_dfltGUI.cell;
  g_fwcfg.isSaved     = 0;
end

clear global g_dfltGUI;

% close GUI
shh     = get(0, 'ShowHiddenHandles');
set(0, 'ShowHiddenHandles', 'on');
currFig = get(0, 'CurrentFigure');
set(0, 'ShowHiddenHandles', shh);
delete(currFig);

g_fwcfg.isBusy = 0;

return;

Contact us at files@mathworks.com