Borrar filtros
Borrar filtros

moving difference function in matlab

17 visualizaciones (últimos 30 días)
tafteh
tafteh el 30 de En. de 2013
Hi all, I recorded the skin conductance signal which is n X 2 vector (amplitude, time). In part of signal analysis i have to apply moving-difference function with a difference interval of 50ms.
The signal sampling interval is 100Hz. Hence the interval for difference function includes 5 points.
What i understood is the moving difference function converts every point in my raw signal into the difference between the value of the point and the value of the point located in a given interval before it (50ms).
I am wondering how I can implement this in MATLAB.
Thanks

Respuesta aceptada

Image Analyst
Image Analyst el 30 de En. de 2013
You can use conv(). Like
kernel = [0 0 0 0 0 1 0 0 0 0 -1];
diffSignal = conv(signal, kernel, 'valid');
  1 comentario
tafteh
tafteh el 30 de En. de 2013
Editada: tafteh el 30 de En. de 2013
Thanks, my kernel indeed became like this:
kernel = [0 0 0 0 1 0 0 0 0 -1];

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Signal Generation and Preprocessing 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