Hello
I want to store 38 channels EEG data in a cell array
my code is working with one channel only hoe can i save my 38 cahnnels data in 38 rows of cells array
a=data.signal(:,:); a=a'; % 38 channels EEG signals
x=1;
y=3;
for k=1:1:(length(new_positions)/3)
new_signal{k}=a(new_positions(x):new_positions(y),1) % new_position is indexing matrix
x=x+3;
y=y+3;
end
its only returing 86x1 cell array instead i need 86x38 cell array

 采纳的回答

hello
your assigning a vector to new_signal{k}
so I believe your intention was :
new_signal{k}=a(new_positions(x):new_positions(y),:) % new_position is indexing matrix
% and not
% new_signal{k}=a(new_positions(x):new_positions(y),1) % new_position is indexing matrix

4 个评论

but still its not moving to the next EEG channel data after doing indexing of 1st channel it stops and gives error
Index exceeds the number of array elements
Could you share some data so I can better test the code ?
its a 7975145x38 matrix after testing 7975145 samples from 1st channel my code need to move to next channel but its not moving to next channel instead it is giving error about dimentions of arry
can you plewase guid me how my code with acces data of all remaning channels
new_signal{k}=a(new_positions(x):new_positions(y),:)
i am passing signal from this condition
here
new_signal is supossed to b 86x38 dimentional cell matrix
a is my raw data of 38 channels 7975145x38
new_position contaions the sapmle no from where it need to pick up sample.
can you show was is exactly the error message ??

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

产品

版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by