reshape with a huge matrix

my matrix is constructed like this: A=[118*9| 118*9| 118*9|118*9|......]
i have a problem using reshape and mean function:
i want to make the mean for each block (118*9) using mean(matrix,2) tp get mean_A=118*9 n times.
i thought i should reashape my matrix in this form:
% reshaped=
[118*9
118*9
118*9
.
.
.
]
and then use the mean. i did Not get it. could you help:
i want to get matrix like this

 채택된 답변

José-Luis
José-Luis 2012년 11월 12일

0 개 추천

arrayfun(@(x) {mean(data(x,:),2},index,'uniformoutput',false);

댓글 수: 2

Daniel Shub
Daniel Shub 2012년 11월 13일
Clearly Rica liked your answer, but I have no idea what you are doing. What are some sample data and index?
José-Luis
José-Luis 2012년 11월 13일
I had answered one of Rica's previous questions so I took a guess at what she (he) meant.

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

추가 답변 (1개)

Daniel Shub
Daniel Shub 2012년 11월 12일

1 개 추천

I am not sure what you mean by your notation. Is this what you are looking for?
n = 10;
x = repmat(1:(118*9), 1, n);
y = reshape(x, 118*9, n);

카테고리

도움말 센터File Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

질문:

2012년 11월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by