Finding period of EEG (peak2peak)

5 Ansichten (letzte 30 Tage)
Shamus Sim
Shamus Sim am 12 Aug. 2020
Kommentiert: Shamus Sim am 12 Aug. 2020
The dataset im working on is EEG signals. I have a variable tsout which is a timeseries object containing 1x600 timeseries.
The data is arranged so that the each column contains a 1s segment of the total timeseries of length 600s. For instance, col 1 represents 0-1s , col2 represent 1-2s and etc. I would like to find the local maximum in these data.
I used this code:
[pks,locs]=findpeaks(tsout)
and obtained this errors
Error using findpeaks
Expected Y to be one of these types:
double, single
Instead its type was timeseries.
Error in findpeaks>parse_inputs (line 199)
validateattributes(Yin,{'double','single'},{'nonempty','real','vector'},...
Error in findpeaks (line 136)
= parse_inputs(isInMATLAB,Yin,varargin{:});
I would like to successive periods based on the peak2peak time values, for every 1 s of the data adn categorize these T calculated according to their time interval(seconds). For instance Period_1 contains all the successive T from 0-1s and so forth.
I am not sure how to implement this and join it w the code for finding peaks. But was thinking of sth like this.
T{i}=locs(2:end) - locs(1:end-1)
Thank you in advance!

Antworten (1)

KSSV
KSSV am 12 Aug. 2020
load("tsout.mat") ;
data = tsout.MCOS ;
[pks,locs]=findpeaks(data) ;
  1 Kommentar
Shamus Sim
Shamus Sim am 12 Aug. 2020
Thank you for your feedback.
I have this error shown.
Unrecognized method, property, or field 'MCOS' for class 'timeseries'.
Im not quite sure what MCOS means. Would you mind explaining?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu EEG/MEG/ECoG finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by