필터 지우기
필터 지우기

Finding period of EEG (peak2peak)

조회 수: 1 (최근 30일)
Shamus Sim
Shamus Sim 2020년 8월 12일
댓글: Shamus Sim 2020년 8월 12일
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!

답변 (1개)

KSSV
KSSV 2020년 8월 12일
load("tsout.mat") ;
data = tsout.MCOS ;
[pks,locs]=findpeaks(data) ;
  댓글 수: 1
Shamus Sim
Shamus Sim 2020년 8월 12일
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?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by