So I wanted to split the 1X15 cell to different cells.

조회 수: 1 (최근 30일)
CalebJones
CalebJones 2019년 9월 18일
댓글: CalebJones 2019년 9월 23일
5.JPG
Yes this is a screenshot of a screenshot.
So I have a 1x15 cell
Each (cell)column is one channel so a total of 15 channels.
2nd screenshot is a 1st channel with 2 states.
So now i wanted to put each state of one channel into a seperate matrix or a cell(preferably a cell).The state changes from rest to active every 200th iteration and vice versa.
So new cell of channel 1 would contain 1 cell for with values for rest block and next cell for active block and so on.
so repeat this for 15 channels.
I have attached mat file of my data.
  댓글 수: 3
CalebJones
CalebJones 2019년 9월 18일
I wanted to split it because i wanted calculate mean,slope,kurtosis,peak which i will use as my feature set for training my model.
CalebJones
CalebJones 2019년 9월 18일
Guillaume any thoughts?

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

채택된 답변

Guillaume
Guillaume 2019년 9월 18일
If you want to perform group statistics, the simplest is indeed to put everything in just one table:
allresults = vertcat(result{:}); %concatenate everything into one table
allresults.channel = repelem((1:numel(result))', cellfun(@height, result)); %and add a channel column
It's then trivial to calculate group statistics with groupsummary or grpstats:
stats = groupsummary(allresults, {'state', 'channel'}, {'mean', @kurtosis}); %not sure what you mean by slope and peak
  댓글 수: 20
Guillaume
Guillaume 2019년 9월 23일
if numel(values) < 3
instead of
if isempty(values)
should fix it.
CalebJones
CalebJones 2019년 9월 23일
Ah great it worked....Thank You so much Guillaume

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by