how to match the date ? and set a flag ?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have created two mat files ! (attached)
I am finding nearest date and correspoding cell (from interpolated_radiosonde ) to mat_data_time dates.
- TT_out gives what exactly what i want. but additionally i also want to create another vector that will tell me the which date (from interpolated_radiosonde) it has chosen as nearest date.
- . The code below finds the nearest date but it doesn't tell how much nearest it is ! i want to add some syntax to this code which will create another timetable/mat file and give the list of dates which has gap more than 12 hours(or any number of hours I set).
any help will be appriciated. thank you.
load 'mat_data_time.mat'
load('interpolated_radiosonde.mat')
mat_data_time = datetime((mat_data_time(1,:))','ConvertFrom','datenum'); %selecting one time from the scan
T = timetable(interpolated_radiosonde(:,2),'RowTimes',datetime(interpolated_radiosonde(:,1),'ConvertFrom','datenum'));
TT_out = retime(T,mat_data_time,'nearest');
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calendar에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!