Help with matrix manipulation in matlab
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
aurc89
el 9 de Sept. de 2014
Comentada: aurc89
el 9 de Sept. de 2014
I have a matrix M with dimension 600x500. I want to do an average of its values along vertical direction, in order to have a matrix with smaller dimension. For example, I want to obtain a matrix with dimension 200x500: this means that, every three values along each column, I take just one (which is the average of the three values). How can I do this ? Thanks!
0 comentarios
Respuesta aceptada
Andrei Bobrov
el 9 de Sept. de 2014
Editada: Andrei Bobrov
el 9 de Sept. de 2014
out = squeeze(mean(reshape(M,3,[],size(M,2))));
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays 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!