eeg_peaks - function[p = eeg_peaks(p eeg_peaks Find peaks...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function [p] = eeg_peaks(p) % eeg_peaks - Find peaks in EEG data % % Usage: [p] = eeg_peaks(p) % % The p structure is explained in eeg_toolbox_defaults. % For this function, it must contain the field called % 'volt.data,' which is assumed to be a matrix % with N rows of EEG sample values from M columns % of electrodes. % % The indices to peak values are returned to % p.volt.peaks.data (which is size(p.volt.data)). % The values are: % 0 no peak % 1 a +ve peak % -1 a -ve peak % % This function finds all peaks in a waveform, where % f(x) changes from an increasing to a decreasing % function and vice versa). These are local minima % and maxima that have a first derivate of zero and % satisfy the first derivative test. % % Thus, the +ve/-ve peak refers to peaks and troughs % in a waveform, regardless of the +ve/-ve value of % the waveform at that point. The peak values are % commonly +ve/-ve potentials, but they may not be. % A +ve peak can have a -ve value where the change % from increasing f(x) to decreasing f(x) occurs % entirely in the range of negative values. % % All the +ve/-ve peak values are returned in: % % p.volt.peaks.all % p.volt.peaks.pos % p.volt.peaks.neg % % If the p.volt.timeArray is defined, then the timing % of the peaks is returned in: % % p.volt.peaks.alltimes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

eeg_peaks - function[p = eeg_peaks(p eeg_peaks Find peaks...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online