フィルターのクリア

Time delay in matlab fuction block used in simulink model.

2 ビュー (過去 30 日間)
Muhammad Mazhar Saeed Butt
Muhammad Mazhar Saeed Butt 2018 年 7 月 30 日
Hi, I developed a power system in simulink. Here, i also use matlab function block and some coding in it. Now i want that when simulink power system starts to simulate, then matlab function block do not operate for first 2 seconds of simulation. In other words i want 2 second time delay of matlab function block. How can i perform that?
Thanks

採用された回答

Jim Riggs
Jim Riggs 2018 年 7 月 30 日
編集済み: Jim Riggs 2018 年 7 月 30 日
Place your Matlab function block into a triggered subsystem block (or an enabled subsystem block), then trigger/enable the block based on time.
  11 件のコメント
Jim Riggs
Jim Riggs 2018 年 7 月 30 日
編集済み: Jim Riggs 2018 年 7 月 30 日
function y = fcn(A,time)
if(time <= 2.0)
y=1;
else
if (A >= 1.8200e+06)
y=0;
else
y=1;
end
end
Muhammad Mazhar Saeed Butt
Muhammad Mazhar Saeed Butt 2018 年 7 月 30 日
It solved my problem. Thanks again.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSwitches and Breakers についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by