Borrar filtros
Borrar filtros

Create loop to extract mean of every 100 values

3 visualizaciones (últimos 30 días)
Edward Keavney
Edward Keavney el 3 de Feb. de 2022
Respondida: David Hill el 3 de Feb. de 2022
Hi,
I have an array, 24000 X 31.
Is there a way of writing a for loop that can take every row of the array to create 31 rows each with 24000 values and then take the mean average of every 100 values in each row. The result should hopefully be 31 separate arrays each with 240 values.
Thanks in advance, Ed.

Respuestas (1)

David Hill
David Hill el 3 de Feb. de 2022
newMatrix=reshape(mean(reshape(yourMatrix,100,[])),240,[]);%columns are each array

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by