Extracting particular data from excel table
Ältere Kommentare anzeigen
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 Kommentare
Dyuman Joshi
am 14 Jun. 2023
Bearbeitet: Dyuman Joshi
am 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
am 14 Jun. 2023
Dyuman Joshi
am 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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Data Import and Analysis finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
