Accumulator in Simulink
问题 I have a MATLAB function block in simulink and for each step simlulink does I want to input a counter with increment 1. Ex: 1st Step -> Acc=1 2nd Step -> Acc=2 I tried using a Count up block + Pulse generator but the time step of simulink is not constant. Any ideas? 回答1: A common way to do this is to use a sum and a memory block with an initial condition of 0. It should count steps in both fixed and variable step simulations. In fact I believe this would be build and perform very much like an