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

3 visualizaciones (últimos 30 días)
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)

Respuestas (0)

Categorías

Más información sobre Block and Blockset Authoring en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by