MATLAB Answers

## i have a data of 1152*3*140 trials(where 1152 is no of sample points , 3 is no of channels ,140 is no of trials) of two classes of elements , i need to separate each class indivdually for particular trials of each channel ? like 1152*1*no of trials

Asked by arunnagiri murrugesan

### arunnagiri murrugesan (view profile)

on 13 Sep 2018
Latest activity Commented on by arunnagiri murrugesan

### arunnagiri murrugesan (view profile)

on 16 Sep 2018
Accepted Answer by ANKUR KUMAR

### ANKUR KUMAR (view profile)

please provide code for separating each class.

#### 0 Comments

Sign in to comment.

## 1 Answer

### ANKUR KUMAR (view profile)

Answer by ANKUR KUMAR

### ANKUR KUMAR (view profile)

on 14 Sep 2018
Accepted Answer

A=rand(1152,3,140);
AA=arrayfun(@(x) squeeze(A(:,x,:)),1:size(A,2),'uni',0);
AA splits A into three parts, each of dimension 1152*140.

#### 1 Comment

arunnagiri murrugesan

### arunnagiri murrugesan (view profile)

on 16 Sep 2018
idx=find(y_train==1); x1=x_train(:,1,idx); y1=y_train(idx);
idx=find(y_train==2); x2=x_train(:,1,idx); t2=y_train(idx); i have done this to separate class 1 and class 2 of each having(1*70)each i have to reshape this each class data into 1152*70 dimension ? how to do that ?

Sign in to comment.