How to get the mean value?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi Everyone,
I want to have a comparison between two stations. The data are in .xls format. One of the column related to s4 which s4>0.2 consider as a event. How can I compute the mean strength of s4. Could you please help me regarding this?
Thank you in advance!
4 commentaires
Walter Roberson
le 22 Mar 2013
A mean over what period? A mean over the entire week will not tell you about number of strong events, as a mix of many short strong events and a few long weak events could still come out in the weak range.
You still need to be specific about what mean is being calculated. Is it the mean number of events? The mean number of events of each type? The mean strength during an event?
Réponses (1)
Tobias
le 22 Mar 2013
You can specify rows and columns to be calculated for all Matlab built-in functions. You said your data is called s4, lets say I want the mean value of the 3rd column in s4:
mean(s4(:,3))
The syntax is (rows,columns), so my previously written code would be: (all rows, 3rd column)
(1:4, 3) would be the rows 1 to 4 in column 3
That way you can manipulate which data you want to do calculations upon, which enables you to calculate the three types of mean values you and Walter talked about.
Voir également
Catégories
En savoir plus sur Time Series Objects 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!