Azzera filtri
Azzera filtri

How to remove artifact signal from my data

6 visualizzazioni (ultimi 30 giorni)
Thiago Petersen
Thiago Petersen il 5 Dic 2018
Modificato: Kevin Chng il 7 Dic 2018
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.

Risposte (1)

Kevin Chng
Kevin Chng il 6 Dic 2018
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 Commenti
Thiago Petersen
Thiago Petersen il 6 Dic 2018
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 il 7 Dic 2018
Modificato: Kevin Chng il 7 Dic 2018
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');

Accedi per commentare.

Categorie

Scopri di più su Electrophysiology in Help Center e File Exchange

Prodotti


Release

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by