Code covered by the BSD License  

Highlights from
delay

from delay by Axel Martinez Möller
Waits for the specified number of seconds.

myWait(DeltaT)
% Waits for the specified number of seconds
function myWait(DeltaT)
if(DeltaT>0) %end condition
    t=timer('timerfcn','myWait(0)','StartDelay',DeltaT);
    start(t);
    wait(t);
end

Contact us at files@mathworks.com