How to get the mean value?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 22 Mär. 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?
Antworten (1)
Tobias
am 22 Mär. 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.
Siehe auch
Kategorien
Mehr zu Time Series Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!