Getting First Cycle in Simulink

4 ビュー (過去 30 日間)
Prashant Srivastava
Prashant Srivastava 2011 年 7 月 30 日
I have a requirement, where I need to initialize some outputs during initialization to some specific values, and later their values might change as time elapses. So what I did is, I connected a Constant block (1) to a Unit Delay(1/z) passed it to a Not Gate and the output of which is given to a Triggered subsystem, where I'll initialize the outputs. Is this gonna work ? Or please suggest some other technique, if any ?

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 7 月 31 日
There are different ways to do the initialization. The Outport block has initial value. You can initialize through that. For complex initialization, you can put all those initialization in a subsystem, make it an Enabled subsystem or triggered subsystem. Then use some types of logic to switch between the initialization algorithm and your regular algorithm. At the output, use the Merge block to create the final output you want.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSchedule Model Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by