Calculate mean and st dev from hist weather data

2 ビュー (過去 30 日間)
Endric Schenk
Endric Schenk 2016 年 4 月 3 日
コメント済み: Star Strider 2016 年 4 月 3 日
Hi,
I have hourly weather data for every year from 2000-2013. Please see attached for the weather data format.
I would like to determine the mean as well as st dev values for every hour!
Can you please support?
best

回答 (1 件)

Star Strider
Star Strider 2016 年 4 月 3 日
Maybe I’m missing something in your description, but with one scalar value for each hour, the mean is that value, and the standard deviation is 0 by definition.
  2 件のコメント
Endric Schenk
Endric Schenk 2016 年 4 月 3 日
I have data from year 2000 through 2013, which mean that I have 13 values, for example, for July 3rd 1pm. Sorry for the too short description above.
Star Strider
Star Strider 2016 年 4 月 3 日
I have to imagine what your data look like, so I created a column vector of 13 years of hourly wind data, then reshaped it to a 24-row matrix, and took the statistics along the rows:
WindSpeed = randi(40, fix(365.25*13)*24, 1); % Create Wind Speed Data As One Column Vector (No Missing Data)
WindSpeed_Hrs = reshape(WindSpeed, 24, []); % Matrix (24xN)
WindWpeedMean = mean(WindSpeed_Hrs, 2); % Take Mean By Rows, Across Columns
WindWpeedStDv = std(WindSpeed_Hrs, [], 2); % Take Mean By Rows, Across Columns

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeWeather and Atmospheric Science についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by