reshape with a huge matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuesta aceptada
José-Luis
el 12 de Nov. de 2012
arrayfun(@(x) {mean(data(x,:),2},index,'uniformoutput',false);
2 comentarios
Daniel Shub
el 13 de Nov. de 2012
Clearly Rica liked your answer, but I have no idea what you are doing. What are some sample data and index?
José-Luis
el 13 de Nov. de 2012
Más respuestas (1)
Daniel Shub
el 12 de Nov. de 2012
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);
0 comentarios
Ver también
Categorías
Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!