Code covered by the BSD License  

Highlights from
delay

3.75

3.8 | 12 ratings Rate this file 52 Downloads (last 30 days) File Size: 1.09 KB File ID: #4194

delay

by Axel Martinez Möller

 

25 Nov 2003 (Updated 26 Nov 2003)

Waits for the specified number of seconds.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (14)
04 Feb 2004 Juan Carlos Fuentes Michel

It works, but only on the R13.

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

01 Sep 2004 Jakob Buron

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

01 Sep 2004 Aman Siddiqi

Works well. Thanks

29 Dec 2005 John D'Errico

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

05 Sep 2006 Nathan McDannold

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

18 Dec 2006 Ming Liu

It stops all the m files.

25 May 2007 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."

12 Nov 2007 Kiran Bhagat

very useful..thanks a lot!

13 Dec 2007 Mukund Kumar

Nice one. Though it generates this unobtrusive error:

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

Undefined command/function 'myWait'.

18 Apr 2008 abhi k

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

27 May 2008 Balázs Vágány

:-) You helped me a lot!
THX!

19 Jun 2008 Sergey B

why not to use simple pause(t) ?

21 May 2010 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?

11 Sep 2011 Sepideh

great job , thanks

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
wait Axel Martinez Möller 22 Oct 2008 07:09:59
timer Axel Martinez Möller 22 Oct 2008 07:09:59
delay Axel Martinez Möller 22 Oct 2008 07:09:59
miscellaneous Axel Martinez Möller 22 Oct 2008 07:09:59
utilities Axel Martinez Möller 22 Oct 2008 07:09:59
delay AAA AAAA 31 May 2009 16:43:13
delay Arun 25 Mar 2010 04:13:45
delay John 04 Jun 2010 12:11:38
delay Pedro 10 Nov 2010 08:00:39
delay Mohamed 27 Jul 2011 07:25:05
delay Vinay 23 Aug 2011 09:21:46
delay Elmar 24 Aug 2011 05:38:30
delay Patyxx 20 Oct 2011 14:01:43
pause Axel Martinez Möller 24 Nov 2011 10:51:56
break Axel Martinez Möller 24 Nov 2011 10:52:15
pause Sofya 13 Dec 2011 17:01:38
delay bijay sa 17 Jan 2012 09:55:52

Contact us at files@mathworks.com