How to mean data of second column with respect to the similar element in the first column
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear All,
I have a data array with two column. The first array is contain repeated values of different order and the second column contain the respective data. I need to mean elements in second column which has same value in the first column. Example of data pic attached hereby. According to the figure i need to mean only values of column two correspond to 0, 0.016667 and so on. Thank you in advance
0 commentaires
Réponses (4)
Cris LaPierre
le 14 Nov 2022
Modifié(e) : Cris LaPierre
le 14 Nov 2022
Use groupsummary or grpstats. Group on column A, and set the 'method' to 'mean', and set the datavars to column B.
If you import you data to a table, use this syntax:
If your data is in vectors, use this syntax
0 commentaires
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!