필터 지우기
필터 지우기

Reduce time with this

조회 수: 2 (최근 30일)
Matlabbey
Matlabbey 2012년 8월 19일
hi all!
i've a filter that is used on the data, but there is lots of data! i am hoping to resample the data(ia take every 2nd point), and than filter it. the problem is that i only have half as many data points. how can i use spline on the filtered data to make it back to the original.
for example, say theres 1000 data points. i resample every other data point to have 500. i feed that data into filter, and have newdata. how can i use spline to fit back to 1000 data points? i tried resampling every 1/2 but that is no good.
any suggestions will be helpful
thank you!!
  댓글 수: 1
Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 19일
편집: Azzi Abdelmalek 2012년 8월 19일
  1. why filter before resampling?
  2. what kind of filter are u using?
if you are using a filter to just remove eventual noise; and don't affect considerably your initial signal; then you have just to interpolate your 500 data. just respect Shanon theorem for sampling

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

답변 (3개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 19일
편집: Azzi Abdelmalek 2012년 8월 19일
example
x=0.2:0.02:10;y=sin(x) %signal with 500 points % sig
xi=0.01:0.01:10; % 1000 points
yi=interp1(x,y,xi,'spline') % interpolated signal yi for points xi

Matlabbey
Matlabbey 2012년 8월 19일
편집: Matlabbey 2012년 8월 19일
It doesnt seem to work. is it because i simply have data and not a function? im hoping that yi will look similar to original data series but filtered. it does something kind of weird. heres what i have for example;
x = [ 1 2 3 4 5 6];
xR = x(1:2:end);
y = filter(xR);
xi = y(1:1/2:end);
yi - interp1(x,y,xi,'spline');

Jan
Jan 2012년 8월 19일
It is a bad idea to omit half of the data before filtering, because the re-creation of these points by using a spline interpolation creates(!) noise again. In addition the interpolation and will take much more time than filtering the signal in its original rate. If the filtering needs too much time for you, try the faster C-Mex FEX: FilterM.
  댓글 수: 1
Matlabbey
Matlabbey 2012년 8월 19일
Thank you for the input!!

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by