Sliding window on Simulink
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello everybody.
I need to implement a sliding window in Simulink to obtain certain ammount of past data in a vectorial form. If we take as example the "Moving average" block in the sliding window mode, what I need is the vector of which the average is calculated.
In case you need more information, what I precisely need to do is the following. I have a (discrete) current of which I want to get the last 5 milliseconds at a certain precise instant of the simulation, when I get a pickup signal of an electrical protection. I need this current in Matlab while the simulation is running. By now, I'm doing so by reading the current (as input signal of an S-function) at each step time since the beginning of the simulation and I'm putting all the information in a vector. This is of course time-consuming. Instead of reading at each step time (the time step is 1e-6 s), I'd prefer to read just in one shot, the whole 5 last milliseconds current data (maybe in a vector or something) when the pickup signal gets activated.
I think there might be an easy way to do so.
Thank you.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!