How have a counter in Simulink such that increment with time step and be real positive number

3 views (last 30 days)
I have a vector of x(500*1) and I want to write a for loop in S-function (Simulink) such that for every time my model runs, I get diff(x(i:i+1)) . How can I have a counter variable( real positive number) that can be used? I even tried to use some counter blocks but none of them works. I need exactly like writing a for loop in mfile, but the counter needs to be incremented by t(Simulink time step)

Answers (0)

Categories

Find more on Block and Blockset Authoring 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!