How to Delay matlab function block?
7 ビュー (過去 30 日間)
表示 古いコメント
Dermansah Hazar Ersoy Yalin
2020 年 7 月 29 日
コメント済み: Dermansah Hazar Ersoy Yalin
2020 年 8 月 4 日
Hello everyone,
I have a system that is shown below.
Inside the Sensor Block I have some initial values and basic calculations like below;
function [distance,sensorID] = fcn(trig)
sensorID = 1;
distance = (trig/2)*(17.15);
with the current structure I can display all the values correctly.However, my aim is to display distances with delays from each other.
For instances I want to display;
Display[Distance] at the beginning
Display[Distance]2 after 3 seconds
Display[Distance]1 after 6 seconds
I have already tried pause function but it makes the function in the block to restart constantly and that is something I avoid. All I need to display values once and after a second turn back to zero,if possible.
If not values can remain on the display,as well.
I hope I could have explained the issue clear enough.Please let me know if there is any other point that I need to clarify.
Thanks in advance!

0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!