creating vector arrays from data set
38 views (last 30 days)
Hi I have an hourly data set of electric load by day. E.g. for each day of Jan'00; I have 24 hours of electric load.I would like to create 31 separate vectors of length 24 (for each hour of the day) to hold the demand data for each day.
Here's my attempt:
numRows = length(dataset);
for i= 1:16:numRows
I'm not sure how to create the right index for the d's. It should look like; d1 = (Hour1, Hour2...Hour 24), first day of data d2 = (Hour1, Hour2, ....Hour 24) of the second day of data
and so on and so forth...
Any suggestions on how to go? Thanks! C
Ahmos Sansom on 13 Jan 2018
Maybe convert column 2 to matlab datetime t = datetime(X,'ConvertFrom','Excel')
Then you cold select the data where weekday = 6 or Hour = 21 etc.
This will give the index and then you can plot the respective values.