moving difference function in matlab

조회 수: 10 (최근 30일)
tafteh
tafteh 2013년 1월 30일
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

채택된 답변

Image Analyst
Image Analyst 2013년 1월 30일
You can use conv(). Like
kernel = [0 0 0 0 0 1 0 0 0 0 -1];
diffSignal = conv(signal, kernel, 'valid');
  댓글 수: 1
tafteh
tafteh 2013년 1월 30일
편집: tafteh 2013년 1월 30일
Thanks, my kernel indeed became like this:
kernel = [0 0 0 0 1 0 0 0 0 -1];

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by