Matlab beginner here…
I have a time series ("d41", 3335 elements). d41's values correspond with integer-hours of the day ("hourall", 3335 elements, e.g., 1, 2, 3, … 23). The Consolidator function should average all values of d41 corresponding with each integer hourall value. This is what I want to achieve, but only applying it to 240 values of d41 and hourall at a time for each iteration of a loop is proving problematic. Is my for statement not specifying an interval to be repeated through the length of the vector? Code below:
for i=1:240:length(d41); [hourallC,d41C]=consolidator(hourall(i), d41(i), 'nanmean', 0);end
Best Answer