comparing the variables of values of two tables
6 views (last 30 days)
I am having the following problem, we have two tables t1 and t2 (an in the attachments), we would like to do the following comparison between them
- - compare two dates values in the tables (using the variables t1.Date3 and t2.date2)., we extract only the matching rows and save them in another table.
- -Then using the saved table we compare the minutes of the two times in the two tables, we choose the row were only the minutes from the second table falls within +-30mins of the minutes from the first table.
- -Then we check if the f0f2 variable for the second table lies within a range of +-0.5 of the f0f2 variable in the first table. then again we remove any non matching rows from the table.
I started off by doing the follwoing but i am not sure if I am doing it in the right way,
%comparing the dates values from t1 and t2
[Lia2, Locb2] = ismember(t1.Date3, t2.date2);
indx2 = Locb2(Locb2 > 0);
%comparing the times of th two tables based on the minutes value
tf = isbetween(t2.date(indx2),tlower,tupper);
%comparing the f0F2 values