How to use mean2 and skip some rows?

2 visualizaciones (últimos 30 días)
Nuria Andreu
Nuria Andreu el 30 de Nov. de 2021
Comentada: Nuria Andreu el 30 de Nov. de 2021
Hello! I have a matrix with dates from 1920's to 2020's. I want to get the means of my column #11. I used mean2 and it worked perfect but I do not want to include the means corresponding to years 1926 to 1929. How can I skip this dates and use mean2 for the entire matrix column?
Thank you!

Respuesta aceptada

DGM
DGM el 30 de Nov. de 2021
What's wrong with just
mymean = mean(yearly_data_matrix(5:end,11));
since you're extracting a vector, I don't see the need for mean2()
  1 comentario
Nuria Andreu
Nuria Andreu el 30 de Nov. de 2021
It worked perfectly, thank you! and thank you for letting me know about the vector

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Type Identification en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by