Hi,
i have a long uni variate timeseries data with 1 minute resolution. Here is an attachment of one part of this data set,shifted into timetable.
this attached data has one time slot ( 28 Mar 2017 21:49:00 to 10 Apr 2017 10:28:00) having negative value, which should not be negative. so i have converted this negative value to NaN, and then this timerange data is interpolated. i have succesfully interpolated this timeslot data. but i am not getting a way to put this interpolated data into the existing time table. caz i need full timetable at the end, with the interpolated values as well . Here is my code, please can any one guide me by looking at my code, what am i missing?
one thing more, when i run this code , it displayed clearly the interpolated data with the existing data in the plot, but with a warning "Warning: Columns of data containing NaN values have been ignored during interpolation. " how to get rid of this warning?
Looking forward to any guidance anxiously…
load OneMinute_ObsData;plot(OneMinute_ObsData.timmendorf_time,OneMinute_ObsData.timmendorf_waterlevel);for i= 1:size(OneMinute_ObsData,1) if( OneMinute_ObsData.timmendorf_waterlevel(i,1)< 0) OneMinute_ObsData.timmendorf_waterlevel(i,1) = NaN; endendTimerange_for_interpolation=[datetime('2017-3-28 21:49:00'):minutes(1):datetime('2017-4-10 10:28:00')]';V = interp1(OneMinute_ObsData.timmendorf_time, OneMinute_ObsData.timmendorf_waterlevel, Timerange_for_interpolation, 'spline');% Plot the interpolated points.
hold onplot(Timerange_for_interpolation,V,'r');
Best Answer