How to remove artifact signal from my data

조회 수: 13 (최근 30일)
Thiago Petersen
Thiago Petersen 2018년 12월 5일
편집: Kevin Chng 2018년 12월 7일
Hi guys,
Hope everything is fine. I am working with some electric signal recordings and i want to remove some artifact signals from my data. I have two spikes: the big spikes, that i want to keep in the file, and the small spikes, that I want to remove from the data (I call this the artifact). Here a code that I use to plot the data:
fs = 48828.128; % my sample rate
t=[1/fs:1/fs:length(wav)/fs]; % to calculate the time (seconds) for x axis
plot(t,wav);
ylabel ('Amplitude (V)');
xlabel ('Time (s)');
I get a plot like this:
So, you guys knows how I can remove this small spikes from the data? Follows the datafile attached.
Thanks for your help.

답변 (1개)

Kevin Chng
Kevin Chng 2018년 12월 6일
Try, however, other might have better answer/solution for it.
load file1
fs = 48828.128; % my sample rate
t=[1/fs:1/fs:length(wav)/fs]; % to calculate the time (seconds) for x axis
wav(wav>0.06 & wav<0.1)=nan;
wav(wav<0.04 & wav>-0.03)=nan;
wav=fillmissing(wav,'linear');
plot(t,wav);
ylabel ('Amplitude (V)');
xlabel ('Time (s)');
xlim([1.7 1.8])
  댓글 수: 2
Thiago Petersen
Thiago Petersen 2018년 12월 6일
Hi Kevin!
Your code works good in some way, but some small peaks still persists during the 15 seconds recording. What I really want is to delete all the small peaks from the recording (the 15 seconds).
Kevin Chng
Kevin Chng 2018년 12월 7일
편집: Kevin Chng 2018년 12월 7일
You may play around with the range on small peak by following command. set them to nan, then link them up by linear interpolation. Will it work for you?
wav(wav>0.06 & wav<0.1)=nan;
wav=fillmissing(wav,'linear');

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

카테고리

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

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by