define a counter which will starts counting from zero automatically when the count reaches to 10
조회 수: 7(최근 30일)
표시 이전 댓글
댓글: Rakesh Singare 2022년 11월 17일
Hello all , can you please explain how to model a simple counter which will continue to count from the start when it reaches its max value to 10.
댓글 수: 0
Chunru 2022년 11월 16일
c = 0; % initialization
c = mod( c + 1, 10); % count from 0 to 9 then re-start
댓글 수: 2
Andy Bartlett 2022년 11월 16일
In a Simulink model, click on the canvas and type "counter"
you'll see a list of blocks
one of these is called Counter Limited
it does exactly what you are asking for.
댓글 수: 1
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!