Sorting and averaging matrices
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
HT
el 9 de Sept. de 2019
Comentada: Matt J
el 16 de Sept. de 2019
- I have two matrices. One for example is A = 520 x 1 and it has numbers from 1-8 which are not in order. For every number in this matrix, I have corresponding 1000 samples in another matrix B 520 x 1000. I want to first sort A and arrange numbers from 1-8 for every 8 rows. So output should be (1,2,3,4,5,6,7,8,1,2,3,4,5 and so on) and arrange corresponding values in B also such that they match.
- Once this is done, I want to average every 5 rows of B and store it in a new matrix which will be 104 x 1000.
Thanks for the help in advance!
4 comentarios
Guillaume
el 9 de Sept. de 2019
100 is not a multiple of 8. Isn't that a problem? Why average every 5 rows when you have groups of size 8?
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!