I have data recorded in ~3 minute bursts at a frequency of 4hz and taken every ~13 minutes. On plotting, therefore, a line is created connecting each of these bursts [see image attached]. To remove this and also to make a complete timeseries with time intervals running complete from the start to end [rather than a table with only the times at which data was recorded], I figured I could create a new table with a complete timeseries with appropriate time interval, merge it with the 'burst time series' and then pack the missing data with NaNs.
I have created the new timeseries
dtn = datenum(['9/11/2016 08:29:11:000';'9/11/2016 17:02:09:000'],'dd/mm/yyyy HH:MM:SS.FFF'); dts = datestr(t(1):1/24/60/60/4:t(2),'dd/mm/yyyy HH:MM:SS'); %create [char] time series 08:29:11-17:02:09 for 9/11/2016
dts=datetime(dts,'InputFormat','dd/MM/yyyy HH:mm:ss');
and with a table of both sets of data, thought I could then use a 'join' to merge them inserting data at appropraite times into 'dts' with gaps to be subsequently filled by NaNs at other times, but haven't had any success in this.
A=table(vpdtime,vppres,... 'VariableNames',{'Time' 'Pressure'});B=table(dts,... 'VariableNames',{'Time'});
Best Answer