필터 지우기
필터 지우기

sgolayfilt limits' condition (first and last sample)

조회 수: 5 (최근 30일)
Mathieu
Mathieu 2015년 8월 26일
댓글: Mathieu 2015년 9월 21일
Hello,
I am actually working with the sgolayfilt function which give me the result I was looking for. But I would like to understand all the function to be certain of the result and there is something I don't find on internet.
How the function do for the first and last sample of the filtered signal? The function fit a polynomial the nearest of the signal using samples on a window. But for the first sample there are not samples before to compute, so is it a zero padding? Or something else?
Thank you for your answer.

채택된 답변

Jan
Jan 2015년 9월 21일
Look in the source code of sgolayfilt. It is one of the benefits of Matlab, that the source code of important functions is provided.
The Savitzy-Golay filter fits a polynomial of order K over F elements of the signal, F > K. At the edge you do not have elements before or after the central elements, respectively. So at the edge you have only (F-1)/2 elements and in consequence a reduced order of the polynomial. You do not use the center of the polynomial as result, as in the steady state, but the point on left, or right, respectively.
  댓글 수: 1
Mathieu
Mathieu 2015년 9월 21일
Thank you! I discover the "edit" function of Matlab ;)

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by