Identify rising and falling edges

55 views (last 30 days)
Azy Craze
Azy Craze on 22 Nov 2012
I have the following line of code
load eeg.txt
fs = 200;
time = 0:1/fs:(length(eeg)-1)*1/fs;
approx_coef = wrcoef('a',coef,lev,'haar',6);
app_max = max(approx_coef);
app_min = min(approx_coef);
The EOG contaminated EEG is decomposed up to 6 levels using Haar wavelet. The approximation coefficients at level 6 are reconstructed. The maximum of the rising and falling edges are found. Now I would like to apply following algorithm to identify ARTIFACTS ZONE.
  • Reconstructed signal samples are compared with its successive samples to identify the edges.
  • The edges are classified into Artifact Rising Edge (ARE), Artifact Falling Edge (AFE), Rising Edge (RE) and Falling Edge (FE) depending on whether the edges correspond to eye blinks and those that do not correspond to eye blinks, based on their relative amplitude.
  • The identified edges ARE, AFE, RE and FE are scaled using four integers 3, 2, 1 and 5 respectively and summed up so as to get the edges information in a single array.
  • After scaling, the values of ARE, AFE, RE and FE are 4, 7, 1 and 5 respectively. The edges and the instants at which they occur are stored in separate arrays.
  • The arrays containing the edges are traversed sequentially to identify unique patterns which correspond to the OA zones. For example, 47 (which is nothing but a OA rising edge followed by OA falling edge) corresponds to OA zone.
  • Once the patterns are identified, the time instants at which the artifacts occur can be obtained and the OA zone can be identified.
please help me with a code for this!!!

Answers (0)


Find more on EEG/MEG/ECoG in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!