Calculate mean of numeric column vector based on repeated rows in a string array
Afficher commentaires plus anciens
Hello, I have a string array (227293-by-3) consisting of weekly dates, latitude and longitude as in the following example:
"20101024 _ 20101031" "416" "826"
"20101024 _ 20101031" "416" "826"
"20101024 _ 20101031" "415" "826"
"20101024 _ 20101031" "415" "827"
"20101024 _ 20101031" "415" "827"
"20101024 _ 20101031" "415" "827"
"20101024 _ 20101031" "415" "827"
I need to calculate the mean of the values in a numerical column vector (227293-by-1) corresponding to the repeating identical rows in the previous string array.
The desired output as per the example would be a column vector:
[mean of rows 1 and 2
row 3
mean of rows 4 through 7...]
I could get the index of the beginning of unique rows in the string array but how could I use that or if there is another method.
Thanks for any assistance.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!