Matlab Scripting - Time Delay

Posted on 2006-05-31
Last Modified: 2016-02-10

I have a Matlab script and was wondering how to create a time delay like a sleep.

Thanks in Advance.
Question by:cactus1
    LVL 2

    Expert Comment

    Well, there is a "wait" command, but you have to mess about with "timer objects", a load of drivel compared to the simple idea of waiting n milliseconds via wait(n);
    LVL 1

    Accepted Solution

    Hi cactus1

    In order to create time delay in matlab, you need the following expression in your code:


    where n is the number of seconds.

    All the best.


    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    A short article about problems I had with the new location API and permissions in Marshmallow
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now