フィルターのクリア

Up and down counter

19 ビュー (過去 30 日間)
shayan
shayan 2012 年 7 月 19 日
コメント済み: Lokesh Bugata 2018 年 7 月 14 日
Hi All:
I am using Simulink, In which I need to count Up and Down depending upon the input values.
Can anyone help me out that is their any way to internallay switch the counter from counting Up to Down or from Down to Up. Or is heir any way to provide the Initial value to the counter from out side the counter block.
If not possible then what should be the ulternate to such sort of problem.
  1 件のコメント
K E
K E 2012 年 7 月 19 日
You might pick up something helpful from this related question.

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

回答 (2 件)

C.J. Harris
C.J. Harris 2012 年 7 月 19 日
I would suggest using either an integrator block with external initial conditions and a switched input, or design a Stateflow block to do this by having a 'CountUp' and a 'CountDown' state.

Lokesh Bugata
Lokesh Bugata 2018 年 7 月 14 日
  1 件のコメント
Lokesh Bugata
Lokesh Bugata 2018 年 7 月 14 日
Try this you will get the up down counter output

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

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by