What is Matlab equivalent of C++ ros::Duration() ?
1 回表示 (過去 30 日間)
古いコメントを表示
The way we call ros::Duration in C++, I need to call in Matlab. What its equivalent expression in MATLAB?
1 件のコメント
Geoff Hayes
2015 年 11 月 27 日
Rahul - are you referring to the code found here ros::Duration Class Reference? See date and time operations for (perhaps) equivalent functionality in MATLAB.
採用された回答
Dave Behera
2015 年 12 月 4 日
ros::Duration five_seconds(5.0); //Duration of 5 seconds
A similar object can be created in MATLAB using 'duration' function:
>> d = duration(0,0,5)
d =
00:00:05
>> d2 = duration(0,0,4)
d2 =
00:00:04
>> d-d2
ans =
00:00:01
The duration function here is of form duration(hour, minute, second). Other ways to use duration can be found here:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Code Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!