我是靠谱客的博主 单薄小兔子,最近开发中收集的这篇文章主要介绍matlab群延时函数,[转载]Matlab延时函数 pause,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

pause

Halt execution temporarily

Syntax

pause

pause(n)

pause on

pause off

pause query

state = pause('query')

oldstate = pause(newstate)

Description

pause, by

itself, causes the currently executing function to stop and wait

for you to press any key before continuing. Pausing must be enabled

for this to take effect. (See pause on, below).

pause without arguments also blocks execution of Simulink

models, but not repainting of them.

pause(n) pauses for

n seconds before continuing, where n can also be a

fraction. The resolution

of the clock is platform specific. Fractional

pauses of 0.01 seconds

should be supported on most platforms.

pause(inf)

puts you into an infinite loop. To return to the MATLAB prompt,

type Ctrl+C.

pause causes a

procedure to stop and wait for the user to strike any

key before continuing.

pause OFF indicates

that any subsequent pause or pause(n) commands

should not actually pause.

This allows normally interactive scripts to

run unattended.

pause ON indicates

that subsequent pause commands should pause.

pause QUERY returns

the current state of pause, either 'on' or 'off'.

STATE = pause(...)

returns the state of pause previous to processing

the input arguments.

The accuracy of pause is

subject to the scheduling resolution of the

operating system you are

using and also to other system activity. It

cannot be guaranteed with

100% confidence, but only with some expected

error. For example,

experiments have shown that choosing N with a

resolution of .1 (such as

N = 1.7) leads to actual pause values that

are correct to roughly 10%

in the relative error of the fractional

part. Asking for finer

resolutions (such as .01) shows higher relative

error.

Examples:

% Pause for 5 seconds

pause(5)

% Temporarily disable pause

pause off

pause(5) % Note that this does not pause

pause on

% Aternatively, disable/restore the state

pstate = pause('off')

pause(5) % Note that this does not pause

pause(pstate);

Tips

The accuracy of pause is subject to the scheduling

resolution of the operating system you are using, and also to other

system activity. It cannot be guaranteed with 100% confidence.

Asking for finer resolutions shows higher relative error.

While MATLAB is paused, the following continue to execute:

Repainting of figure windows, Simulink block diagrams, and Java

windows

HG callbacks from figure windows

Event handling from Java windows

最后

以上就是单薄小兔子为你收集整理的matlab群延时函数,[转载]Matlab延时函数 pause的全部内容,希望文章能够帮你解决matlab群延时函数,[转载]Matlab延时函数 pause所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(59)

评论列表共有 0 条评论

立即
投稿
返回
顶部