Grouping data into bins and then plotting them

3 ビュー (過去 30 日間)
Salma fathi
Salma fathi 2021 年 10 月 17 日
コメント済み: Salma fathi 2021 年 10 月 17 日
Hello, I am trying to read some tables into matlab, the tables contain the variable 'hour' to represent the time when the data accurued. after reading the tables we would like to bin the data in the table according to the 'hour' variable and then plot the data to see how they are changing.
for example: we would like to see how the data is changing every three hours in the day, so from all the data set we have we would like to group the data of the first three hours and then plot them and see and so on for the rest of 24hrs. How can we possibly implement that?

採用された回答

KSSV
KSSV 2021 年 10 月 17 日
You can calculate the every three hours mean using the fuction retime. Read about it. To see the variation of every hours, striaght aways you can use plot.
  10 件のコメント
KSSV
KSSV 2021 年 10 月 17 日
Using historgram helps you to split the data into intervals, get the indices of the intervel bins and then use these indices to plot using in your required way.
Salma fathi
Salma fathi 2021 年 10 月 17 日
Thank you for the help, you gave me a much more effecient way to deal with my data. really apperciate it.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by