Hello all, I have been trying to analyize wind measurement data. The dataset contains, measurement time, direction and wind speeds at different heights.The measurement has gab and I would like to replace this gaps by NaN. To do that I began producing constant timestep and replace in the time measurment so that to replace the observation by NaN. However I could not do that therefore would you please help me? here is the matlab code:
ds1b=dataset('file','1201b.txt')time_initial=ds1b.Time(:);time_initialmat=datenum(time_initial)*86400;time_final=ds1b.Time(end);time_finalmat=datenum(time_final)*86400;time_range=time_finalmat-time_initialmat;calltime(1,1)=time_initialfor i =1:tim_range time_initialmat= time_initialmat+1; calltime(i,1)=datestr(time_initialmat/86400, ... 'ConvertFrom','datenum','Format','yyyy-MM-dd HH:mm:ss'));end auxtime=dataset(calltime,'VarNames','Time'); res=join(dsb1, auxtime, 'Type', 'rightouter', 'MergeKeys', true);
Best Answer