Determining maximum and minimum Daily temperatures

5 ビュー (過去 30 日間)
Neirouz Bouhrira
Neirouz Bouhrira 2019 年 4 月 15 日
コメント済み: Jon 2019 年 4 月 15 日
I have Data from 1985 to 2017 containing the recorded Temperature every hour . The First column contains
1.Date format :
  • YYYYMMDDHH
FROM (1985010100 ) (2017123123 )
The second column conains
2.Temperature every hour
Question: I want to determine the maximum and minimum daily temperatures from 1985 to 2017 .
Thank you
  1 件のコメント
Adam Danz
Adam Danz 2019 年 4 月 15 日
編集済み: Adam Danz 2019 年 4 月 15 日
Ok, where are you at in this project? Have you loaded the data into matlab? If yes, how are the variables stored? Are you having trouble isolating the data between the two dates? Let us know how we can help you.

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

回答 (1 件)

Jon
Jon 2019 年 4 月 15 日
If you have exactly 24 data points for each day (one for every hour) then you could use this approach, assume you have your data in an a two dimensional array named data
% determine total number of days of data
numDays = length(data)/24;
% reshape your temperature data so that you have a column for each day, with a row for each hour in the day
Tdata = reshape(data,24,numDays)
% calculate your min and max for each day
dailyMin = min(Tdata);
dailyMax = max(Tdata);
If your data is somehow less regular and you are missing entries for certain hours then you will have to do something more involved

カテゴリ

Help Center および File ExchangeLanguage Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by