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

2 次查看(过去 30 天)
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)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Block and Blockset Authoring 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by