Borrar filtros
Borrar filtros

sliding window for a sampled signal

7 visualizaciones (últimos 30 días)
Mohammad Wasi Ahmadi
Mohammad Wasi Ahmadi el 5 de Jul. de 2017
Comentada: Walter Roberson el 19 de Oct. de 2018
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 comentario
Walter Roberson
Walter Roberson el 19 de Oct. de 2018
Please do not close Question that have an Answer.

Iniciar sesión para comentar.

Respuestas (2)

Rik
Rik el 5 de Jul. de 2017
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 comentarios
Mohammad Wasi Ahmadi
Mohammad Wasi Ahmadi el 5 de Jul. de 2017
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 el 8 de Jul. de 2017
I used movmax but the output is mxArray. how can I change to a double variable?

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 9 de Jul. de 2017
Perhaps you could use a Buffer Block with overlap specified.

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by