How to get the mean value?

1 vue (au cours des 30 derniers jours)
Ara
Ara le 22 Mar 2013
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
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?
Ara
Ara le 22 Mar 2013
Modifié(e) : Ara le 23 Mar 2013
I want to plot "mean strength during an event".

Connectez-vous pour commenter.

Réponses (1)

Tobias
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.
  1 commentaire
Ara
Ara le 22 Mar 2013
Thank you to describe me. But, s4 in the name of my column and I only work with column data. In this column some values are greater than 0.2 so that was why I said mean strength during this event. It means I want to know about the mean of s4 during one day or even one month. As Walter said, events will be mixed together. Also another column of my data is related to time but I do not know how to match these together to get mean of the event?

Connectez-vous pour commenter.

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!

Translated by