average

6 次查看(过去 30 天)
Lisa Justin
Lisa Justin 2012-2-6
编辑: Matt J 2013-10-1
i have a 42*16384. how do i average it so that i get a new matrix of size 42*2048 (if N=2048 represents one revolution and N=16384 represents 8 revolutions).

采纳的回答

Andrei Bobrov
Andrei Bobrov 2012-2-6
data - your array [42x16384]
EDIT
out = mean(reshape(data,size(data,1),[],8),3);
eg:
data - your array [55x72000]
out = mean(reshape(data,size(data,1),[],3),3);
or
out = squeeze(mean(reshape(data,size(data,1),3,[]),2)) ;
  5 个评论
Lisa Justin
Lisa Justin 2012-2-6
I am still getting the same error message with
out = squeeze(mean(reshape(data.',size(data,2),8,[]),2)).'
Andrei Bobrov
Andrei Bobrov 2012-2-6
see EDIT

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by