how to reduce the matrix dimmension?

1 次查看(过去 30 天)
mostafa
mostafa 2014-10-26
评论: Matt J 2014-10-26
Hi all
I have a EEG data which is a 4D matrix with this size
ans =
36 18 10 2560
36: Persons
18: Channels
10: Times the test repeat
2560: Data sampled by 512 Hz for 5S
Now I want just a 2D matrix with channels in rows and data in columns. how can I reduce the dimension?

回答(1 个)

Matt J
Matt J 2014-10-26
A=permute(A,[2,1,3,4]);
A=reshape(A,18,[]);
  2 个评论
mostafa
mostafa 2014-10-26
what the first line do? because i just run the reshape command and the answer was the same.
Matt J
Matt J 2014-10-26
You should never have to ask what a command does. You have the "doc" and "help" commands. You also have online documentation,

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by