dates = [datetime('today'); datetime('Yesterday') ;datetime('tomorrow')];
data = [-0.1 ; 0 ;0.1];
T = table(dates,data)
FindDate = '27-Oct-2021';
[val,index] = min(abs((datenum(T.dates)-datenum(FindDate))));
T.data(index)
FindDate = '29-Oct-2021';
[val,index] = min(abs((datenum(T.dates)-datenum(FindDate))));
T.data(index)
FindDate = '28-Oct-2021';
[val,index] = min(abs((datenum(T.dates)-datenum(FindDate))));
T.data(index)