I know this question has been asked a number of times, but a thorough search did not help me find an answer and as I am very new to matlab I need some help. I need to count the number of peaks in a large body of EEG data. The code below allows me to plot what the data looks like (for 1 piece of data). I need to count the really long narrow spikes.
% create the trial definition cfg=[]; cfg.filename = ['I:\EEG\',SubNum{subject},'\',FolderName, GroupName, SeqNum{subject}, '_', SubNum{subject}, '_Block', num2str(block), '.bdf']; cfg.dataset = cfg.filename; cfg.continuous = 'yes'; data_org = ft_preprocessing(cfg) channel = 164; plot(data_org.time{1}, data_org.trial{1}(channel, :)) xlabel('time (s)') ylabel('channel amplitude (uV)') legend(data_org.label(channel))
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
You forgot to attach your data, so we can't try anything with it. Attach it if you want better help. Otherwise, if you have the Signal Processing Toolbox, you can try medfilt(), sgolayfilt(), and findpeaks(). It sounds like you tried findpeaks() and say it doesn't work for some reason, though you did not specify why it failed or what parameters you used for it. For the Savitzky-Golay filter, use it to smooth the signal and remove spikes. This gives you like a background that you can then subtract from the original signal to give a "spikes-only" signal.
SEE COMPLETE ANSWER CLICK THE LINK
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Comments
Post a Comment