필터 지우기
필터 지우기

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 CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by