Extracting particular data from excel table
Show older comments
I have a .csv file, which I have imported as a table in matlab. The table has freuency values for each minute of the day for the entire 24 hours. I want to analyse the data by studying each hour separately and plotting a graph for each hour. How can extract such data?
3 Comments
Dyuman Joshi
on 14 Jun 2023
Edited: Dyuman Joshi
on 14 Jun 2023
You can reshape your data and do analysis accordingly -
%Sample data, 60*24 minutes in 24 hours
y = 1:60*24;
%After reshaping, each column will correspond to data of each hour
z = reshape(y,60,[])
Indrani
on 14 Jun 2023
Dyuman Joshi
on 14 Jun 2023
It seems like the data is for every milisecond, so 00:00.0 to 59:59.9 is an hour, and the data from B2-B36001 (i.e. 36000 miliseconds in an hour) is to be analaysed and B36002-B72001, B72002-B108001 and ..., so on.
So you can use
reshape(data,36000,[])
to get the output as data for each hour in each column. Then you can use functions on the 2nd dimension of the array to directly get result.
Also, there seems to be some missing data in the file. As the number of rows is not a multiple of 36000
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!