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

 채택된 답변

Mathieu NOE
Mathieu NOE 2021년 6월 30일

0 개 추천

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

hajrah Sultan
hajrah Sultan 2021년 7월 1일
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
Mathieu NOE
Mathieu NOE 2021년 7월 1일
Could you share some data so I can better test the code ?
hajrah Sultan
hajrah Sultan 2021년 7월 1일
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.
Mathieu NOE
Mathieu NOE 2021년 7월 1일
can you show was is exactly the error message ??

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2021년 6월 30일

댓글:

2021년 7월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by