필터 지우기
필터 지우기

sliding window for a sampled signal

조회 수: 7 (최근 30일)
Mohammad Wasi Ahmadi
Mohammad Wasi Ahmadi 2017년 7월 5일
댓글: Walter Roberson 2018년 10월 19일
I sampled a continuous signal by using rate transition block in Simulink. now, How can I calculate the maximum absolute value of previous i.e. 100 samples for each input sample. is there any simulink block? or should I use any digital filter and how?
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 10월 19일
Please do not close Question that have an Answer.

댓글을 달려면 로그인하십시오.

답변 (2개)

Rik
Rik 2017년 7월 5일
When you have the signal as a vector, you can use movmean to find the moving average. You can modify the window to only include the previous 99 values to get a 100 value wide window.
M = movmean(A,[99 0]);
  댓글 수: 2
Mohammad Wasi Ahmadi
Mohammad Wasi Ahmadi 2017년 7월 5일
My signal is a time domain, not a vector. and I need the maximum value of previous 100 samples. I used the movmean and moving maximum blocks in simulink but they did not work and gives dimension error
Mohammad Wasi Ahmadi
Mohammad Wasi Ahmadi 2017년 7월 8일
I used movmax but the output is mxArray. how can I change to a double variable?

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2017년 7월 9일
Perhaps you could use a Buffer Block with overlap specified.

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by