File Exchange

image thumbnail

delay

version 1.0 (1.09 KB) by

Waits for the specified number of seconds.

2 Downloads

Updated

View License

Simple code that waits for the specified number of seconds. To use it, call "myWait(DeltaT)" with DeltaT in [s]. It does so using MATLAB timers, in this way it doesn't take computer resources (CPU), allowing other programs to run simultaneously.

Comments and Ratings (14)

Sepideh

great job , thanks

Michael Purdy

Can it wait for a shorter time that pause? In other words, pause can only wait a minumum of 0.01s. Can this one wait for a shorter time?

Sergey B

why not to use simple pause(t) ?

Balázs Vágány

:-) You helped me a lot!
THX!

abhi k

this was very much required.
a very very thank you.

Mukund Kumar

Nice one. Though it generates this unobtrusive error:

??? Error while evaluating TimerFcn for timer 'timer-5647'

Undefined command/function 'myWait'.

Kiran Bhagat

very useful..thanks a lot!

Peter Mao

I find it useful mainly because I can never remember the name of the function "PAUSE" and I'm always trying "wait," "delay," and "sleep."

actually, I've found that I come back here whenever I forget about "pause."

Ming Liu

It stops all the m files.

Nathan McDannold

Works great! It's nice to see a pause function that doesn't use 100% of my CPU!

John D'Errico

How is this any improvement over pause(T)? Even better, pause works in any version of matlab, new or old.

Aman Siddiqi

Works well. Thanks

Jakob Buron

It works, but the builtin 'pause(n)' function does the same.

Juan Carlos Fuentes Michel

It works, but only on the R13.

Is there someone who's got something for the R12 version?

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video