<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>Dear all,<br></div>i have the following problem on my EEG data.<br></div>I have a noisy wave generated by an external trigger <br></div>and I need to transform this wave into squared waves<br>
in order to use these waves as events for the<br></div>erp analysis.<br><br></div>I attach a jpg of my wave (first line in blu) and a set<br></div>of waves that i desire (red waves): i need <br>- squared waves or<br>- the first peak of each wave (desirable option) or<br>
</div><div>- the middle peak of each wave or<br></div><div>- the final peak of each wave.<br></div><div>With the peak I can subsequently epoch<br></div></div>the EEG and analyze the ERPs.<br><br></div>I looked at this function: <br>
[pks,locs] = findpeaks(canaleTrigger,'MinPeakHeight',2000000,'MinPeakDistance',100,'THRESHOLD',2000000);<br><br></div>I tried to change the values but unsuccessfully. <br></div>When I apply this function the program finds too many peaks<br>
and not the first peak of each wave.<br></div><div>Is this function correct? How can I successfully apply the function?<br></div><div>Are there other ways to solve this problem?<br></div><div><br></div>Thanks,<br><br></div>
Elisa<br></div>