Filter löschen
Filter löschen

Up and down counter

25 Ansichten (letzte 30 Tage)
shayan
shayan am 19 Jul. 2012
Kommentiert: Lokesh Bugata am 14 Jul. 2018
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 Kommentar
K E
K E am 19 Jul. 2012
You might pick up something helpful from this related question.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

C.J. Harris
C.J. Harris am 19 Jul. 2012
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 am 14 Jul. 2018
  1 Kommentar
Lokesh Bugata
Lokesh Bugata am 14 Jul. 2018
Try this you will get the up down counter output

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by