can any one tell me please how to give a discrete input per cycle to simulink model? i mean i want to give input like 01011 and model should take the input one by one per cycle. So first cycle it should take i/p as 0, next cycle 1, next+1 cycle 0 etc.

 採用された回答

TAB
TAB 2012 年 5 月 15 日

3 投票

Possible with any of the following blocks
Sources\From Workspace
Sources\Repeating Sequence
Sources\Repeating Stair

5 件のコメント

Sukumar Paul
Sukumar Paul 2012 年 5 月 15 日
Thanks a lot dude. I am using Sources\Repeating Sequence.
i wanted to execute my model every 100 ms and wanted to give the discrete input every 100 ms as well.
Do i need to change the sample time in the lower block as well?
TAB
TAB 2012 年 5 月 15 日
Which lower block? Repeating Sequence don't have any sample time property.
It outputs the waveform that repeats every PERIOD value defined in its property.
I think "Repeating Sequence Stair" is best suitable for your need.
Sukumar Paul
Sukumar Paul 2012 年 5 月 15 日
Hey thanks for tour replay again. i am using "Repeating Sequence Stair" and it is working for me.
K E
K E 2012 年 5 月 15 日
If anyone reading this is curious about 'Repeating Sequence Stair' which outputs and repeats a stair sequence that you would specify, see http://www.mathworks.com/help/toolbox/simulink/slref/repeatingsequencestair.html
Sukumar Paul
Sukumar Paul 2012 年 5 月 17 日
Thanks K E .

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by