Finding period of EEG (peak2peak)
5 次查看(过去 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!