reset
Rate
オブジェクトのリセット
説明
入力引数
rate
— Rate
オブジェクト
ハンドル
Rate
オブジェクト。ハンドルとして指定します。このオブジェクトには、目的のレートについての情報や、実行に関するその他の情報が格納されています。詳細については、rateControl
を参照してください。
例
固定レートでのループの実行と Rate オブジェクトのリセット
20 Hz で実行される rateControl
オブジェクトを作成します。
r = rateControl(2);
Rate
オブジェクトを使用してループと制御の操作を開始します。
for i = 1:30 % Your code goes here waitfor(r); end
ループ操作後の rateControl
オブジェクトのプロパティを表示します。
disp(r)
rateControl with properties: DesiredRate: 2 DesiredPeriod: 0.5000 OverrunAction: 'slip' TotalElapsedTime: 15.0181 LastPeriod: 0.5000
オブジェクトをリセットして時間統計を再開します。
reset(r); disp(r)
rateControl with properties: DesiredRate: 2 DesiredPeriod: 0.5000 OverrunAction: 'slip' TotalElapsedTime: 0.0075 LastPeriod: NaN
バージョン履歴
R2016a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)