Code covered by the BSD License  

Highlights from
SAE Paper Demo: Model-Based Design of Hybrid Electric Vehicles

image thumbnail

SAE Paper Demo: Model-Based Design of Hybrid Electric Vehicles

by

 

07 Nov 2010 (Updated )

Demo files to accompany the paper by the same name

startAnimation(hcarGUI,order,dir,rate)
function startAnimation(hcarGUI,order,dir,rate) 
%order is a cell array of vectors. Each vector is a list of arrows that need to be animated simultaneously
global tmr
period = 1/rate;
period = round(period*1000)/1000;
if(~isnumeric(tmr) && isvalid(tmr))
    
    stop(tmr);
    delete(tmr);
    tmr = timer('TimerFcn',{'timerFcn',hcarGUI,order,dir},'StartFcn',{'timerStartFcn',hcarGUI,order,dir},'StopFcn',... 
                {'timerStopFcn',hcarGUI,order,dir},'Period',period,'ExecutionMode','fixedrate');
    start(tmr);
    
else
    
    tmr = timer('TimerFcn',{'timerFcn',hcarGUI,order,dir},'StartFcn',{'timerStartFcn',hcarGUI,order,dir},'StopFcn',... 
                {'timerStopFcn',hcarGUI,order,dir},'Period',period,'ExecutionMode','fixedrate');
    start(tmr);
    
end




        

Contact us