Effacer les filtres
Effacer les filtres

Operation of specific elements of a matrix

1 vue (au cours des 30 derniers jours)
Alexis Villacis
Alexis Villacis le 18 Déc 2018
I have a matrix of dimensions 3000x3.
I need to compute statistics for the elements (1,1),(4,1),(7,1), (10,1),...,(3000,1)
how can I code this statistic i.e mean? It is basically the mean of the elements of the first colum, which are in rows 1,4,7,10...3000 i.e i+3?

Réponse acceptée

madhan ravi
madhan ravi le 18 Déc 2018
mean(matrix(1:3:end,1))

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by