Finding period of EEG (peak2peak)
조회 수: 1 (최근 30일)
이전 댓글 표시
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!
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!