What is the latest Matlab equivalent of slrt SampleTime?
2 ビュー (過去 30 日間)
古いコメントを表示
I have some code for an older version of Matlab, that creates a target object and grabs the sample time:
tg = slrt;
SampleTime = tg.SampleTime;
However, in the latest version of Matlab, the syntax should now be:
tg = slrealtime;
But I do not know how to get the sample time. What should the new syntax be? I have scoured Matlab documentation and am unable to find the answer.
3 件のコメント
回答 (1 件)
Stefanie Schwarz
2023 年 11 月 17 日
You can use the target object "TETInfo" property:
>> tg = slrealtime;
>> tg.load('mymodel');
>> tg.ModelStatus.TETInfo
ans =
struct with fields:
Rate: 0.0100
Here is a cheat sheet for the API upgrade to SLRT R2020b and later:
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!