Good day, everyone.
As attached is my observations data for 24 hours from different transmitter (PRN) . The data here are from 1/1/2014 to 31/1/2014. From the excel (refer attachment), I already extracted 1-minute average for all PRN in 31 days via the code below.
My problem now is how to calculate the rate of change per 5 minute from data in PRNTT1min. Already done on step 6 on managing time series for 5-mins resampling but I couldn't figure out to find the rate of change. May be the answer is already there but I am completely lost now.
Thank you in advanced.
%_______________1- Read data_______________%
data = readtable("Book_Jan.xlsx");%___2- Convert DAY and TIME into durations___%
data.DAY = days(data.DAY);data.TIME = days(data.TIME);%___3- Create a datetime___%
data.TimeStamp = datetime(2014,01,01) + data.DAY-1 + data.TIME;data.TimeStamp.Format = "MM-dd-yy HH:mm";%___4- Convert the table to a timetable___%
dataTT = table2timetable(data,"RowTimes","TimeStamp");%___5- Use retime to average the PRN data into 1 minute increments___%
PRNTT1min = retime(dataTT(:,["VTEC" "S4" "Sigma"]),"minutely","mean");%___6- Round time to nearest 5 min and take unique values only___%
tt = data.TimeStamp;tt.Minute = 5 * floor(tt.Minute/5); %5 means for 5 mins resampling
tt.Second = 0;NEWTIMESTEP = unique(tt);%%%%%___PROBLEM HERE___%%%%%
%___7- Find rate of change of VTEC, S4, Sigma for 5 mins___%
%%%%%___NEED HELP HERE TOO___%%%%%
Best Answer