Hi there,
I am having a little difficulty and was wondering if anyone had done something similar. I have a very large array (imported from Excel); 4884×2. This is data for each day over a 6 month period. I have also imported the dates, used datenumber and added them to the matrix. For each day there are elements every 15 minutes (new row). Unfortunately there are times missing resulting in reshape not being correct.
I am trying to create a cell array where each cell is an individual dates data (i.e all the time readings for the 4th of August).
My code currently reads in the excel file, dates and times.
I then
dates = datetime(datestr(dates));days = day(dates); unidays = unique(days); months = month(dates); unimonths = unique(months);
Followed by
datenumber = datenum(dates);dt = unique(datenumber);a = horzcat(datenumber,data);for ii = 1:length(dt) for iii = 1:32% for iiii = length(data)
v{ii} = data(iii,:);% end
endend
An example of the excel sheet (only an extract) is:
2017/03/27 09:15 23.32362362 25.36263524
2017/03/27 09:30 14.26554124 52.36512337
2017/03/27 09:45 45.97456444 75.25463254
2017/03/27 10:00 41.69875632 37.95423965
With times going on to later in the day.
Thanks
Best Answer