Data1 = readtimetable('Data1.xlsx');
Data2 = readtimetable('Data2.xlsx');
Data3 = readtimetable('Data3.xlsx');
Maybe one of the following approaches using synchronize will work for what you want to do. The difference is how the missing State values are filled in.
1. Use NaNs for missing State values:
AllData = synchronize(Data1,Data2,Data3,Data1.Time);
disp(AllData)
Time State_Data1 State_Data2 State_Data3
____________________ ___________ ___________ ___________
07-Aug-2023 12:52:00 0 0 0.8125
07-Aug-2023 12:52:01 0 0 0.8125
07-Aug-2023 12:52:02 0 NaN 0.8125
07-Aug-2023 12:52:03 0 NaN 0.8125
07-Aug-2023 12:52:04 0 NaN 0.8125
07-Aug-2023 12:52:05 0 NaN 0.8125
07-Aug-2023 12:52:06 0 NaN 0.8125
07-Aug-2023 12:52:07 0 NaN 0.8125
07-Aug-2023 12:52:08 0 NaN 0.8125
07-Aug-2023 12:52:09 0 NaN 0.8125
07-Aug-2023 12:52:10 0 NaN 0.8125
07-Aug-2023 12:52:11 0 NaN 0.8125
07-Aug-2023 12:52:12 0 NaN 0.8125
07-Aug-2023 12:52:13 0 NaN 0.8125
07-Aug-2023 12:52:14 0 NaN 0.8125
07-Aug-2023 12:52:15 0 NaN 0.8125
07-Aug-2023 12:52:16 0 NaN 0.8125
07-Aug-2023 12:52:17 0 NaN 0.8125
07-Aug-2023 12:52:18 0 NaN 0.8125
07-Aug-2023 12:52:19 0 NaN 0.8125
07-Aug-2023 12:52:20 0 NaN 0.8125
07-Aug-2023 12:52:21 0 NaN 0.8125
07-Aug-2023 12:52:22 0 NaN 0.8125
07-Aug-2023 12:52:23 0 NaN 0.8125
07-Aug-2023 12:52:24 0 NaN 0.8125
07-Aug-2023 12:52:25 0 NaN 0.8125
07-Aug-2023 12:52:26 0 NaN 0.8125
07-Aug-2023 12:52:27 0 NaN 0.8125
07-Aug-2023 12:52:28 0 NaN 0.8125
07-Aug-2023 12:52:29 0 NaN 0.8125
07-Aug-2023 12:52:30 0 NaN 0.8125
07-Aug-2023 12:52:31 0 NaN 0.8125
07-Aug-2023 12:52:32 0 NaN 0.8125
07-Aug-2023 12:52:33 0 NaN 0.8125
07-Aug-2023 12:52:34 0 NaN 0.8125
07-Aug-2023 12:52:35 0 NaN 0.8125
07-Aug-2023 12:52:36 0 NaN 0.8125
07-Aug-2023 12:52:37 0 NaN 0.8125
07-Aug-2023 12:52:38 0 NaN 0.8125
07-Aug-2023 12:52:39 0 NaN 0.8125
07-Aug-2023 12:52:40 0 NaN 0.8125
07-Aug-2023 12:52:41 0 NaN 0.8125
07-Aug-2023 12:52:42 0 NaN 0.8125
07-Aug-2023 12:52:43 0 NaN 0.8125
07-Aug-2023 12:52:44 0 NaN 0.8125
07-Aug-2023 12:52:45 0 NaN 0.8125
07-Aug-2023 12:52:46 0 NaN 0.8125
07-Aug-2023 12:52:47 0 NaN 0.8125
07-Aug-2023 12:52:48 0 NaN 0.8125
07-Aug-2023 12:52:49 0 NaN 0.8125
07-Aug-2023 12:52:50 0 NaN 0.8125
07-Aug-2023 12:52:51 0 NaN 0.8125
07-Aug-2023 12:52:52 0 NaN 0.8125
07-Aug-2023 12:52:53 0 NaN 0.8125
07-Aug-2023 12:52:54 0 NaN 0.8125
07-Aug-2023 12:52:55 0 NaN 0.8125
07-Aug-2023 12:52:56 0 NaN 0.8125
07-Aug-2023 12:52:57 0 NaN 0.8125
07-Aug-2023 12:52:58 0 NaN 0.8125
07-Aug-2023 12:52:59 0 NaN 0.8125
07-Aug-2023 12:53:00 0 NaN 0.8125
07-Aug-2023 12:53:01 0 NaN 0.8125
07-Aug-2023 12:53:02 0 NaN 0.8125
07-Aug-2023 12:53:03 0 NaN 0.8125
07-Aug-2023 12:53:04 0 NaN 0.8125
07-Aug-2023 12:53:05 0 NaN 0.8125
07-Aug-2023 12:53:06 0 NaN 0.8125
07-Aug-2023 12:53:07 0 NaN 0.8125
07-Aug-2023 12:53:08 0 NaN 0.8125
07-Aug-2023 12:53:09 0 NaN 0.8125
07-Aug-2023 12:53:10 0 NaN 0.8125
07-Aug-2023 12:53:11 0 NaN 0.8125
07-Aug-2023 12:53:12 0 NaN 0.8125
07-Aug-2023 12:53:13 0 NaN 0.8125
07-Aug-2023 12:53:14 0 NaN 0.8125
07-Aug-2023 12:53:15 0 NaN 0.8125
07-Aug-2023 14:01:14 -125 NaN -125
07-Aug-2023 14:01:15 -125 NaN -125
07-Aug-2023 14:01:16 -125 NaN -125
07-Aug-2023 14:01:17 -125 NaN -125
07-Aug-2023 14:01:18 -125 NaN -125
07-Aug-2023 14:01:20 -125 NaN -125
07-Aug-2023 14:01:21 -125 NaN -125
07-Aug-2023 14:01:22 -125 NaN -125
07-Aug-2023 14:01:23 -125 0 -125
07-Aug-2023 14:01:24 -125 0 -125
07-Aug-2023 14:01:25 0 0 0.125
07-Aug-2023 14:01:26 0 0 0.5
07-Aug-2023 14:01:27 0 NaN 0.75
07-Aug-2023 14:01:29 0 0 0.75
07-Aug-2023 14:01:30 0 0 0.75
07-Aug-2023 14:01:31 0 0 0.75
07-Aug-2023 14:01:32 0 0 0.75
07-Aug-2023 14:01:33 0 0 0.75
07-Aug-2023 14:01:34 0 0 0.75
07-Aug-2023 14:01:35 0 0 0.75
07-Aug-2023 14:01:36 0 0 0.75
07-Aug-2023 14:01:37 0 0 0.75
07-Aug-2023 14:01:38 0 0 0.75
07-Aug-2023 14:01:39 0 0 0.75
07-Aug-2023 14:01:40 0 0 0.75
07-Aug-2023 14:01:41 0 0 0.75
07-Aug-2023 14:01:42 0 0 0.75
07-Aug-2023 14:01:43 0 NaN 0.75
07-Aug-2023 14:01:44 0 0 0.75
07-Aug-2023 14:01:45 0 0 0.75
07-Aug-2023 14:01:46 0 0 0.75
07-Aug-2023 14:01:47 0 0 0.75
07-Aug-2023 14:01:48 0 0 0.75
07-Aug-2023 14:01:49 0 0 0.75
07-Aug-2023 14:01:50 0 0 0.75
07-Aug-2023 14:01:51 0 0 0.75
07-Aug-2023 14:01:52 0 0 0.75
07-Aug-2023 14:01:53 0 0 0.75
07-Aug-2023 14:01:54 0 0 0.75
07-Aug-2023 14:01:55 0 0 0.75
07-Aug-2023 14:01:56 0 0 0.75
07-Aug-2023 14:01:57 0 0 0.75
07-Aug-2023 14:01:58 0 0 0.75
07-Aug-2023 14:01:59 0 0 0.75
07-Aug-2023 14:02:00 0 0 0.75
07-Aug-2023 14:02:01 0 0 0.75
07-Aug-2023 14:02:02 0 0 0.75
07-Aug-2023 14:02:03 0 0 0.75
07-Aug-2023 14:02:04 0 0 0.75
07-Aug-2023 14:02:05 0 0 0.75
07-Aug-2023 14:02:06 0 0 0.75
07-Aug-2023 14:02:07 0 0 0.75
07-Aug-2023 14:02:08 0 0 0.75
07-Aug-2023 14:02:09 0 0 0.75
07-Aug-2023 14:02:10 0 0 0.75
07-Aug-2023 14:02:11 0 0 0.75
07-Aug-2023 14:02:12 0 0 0.75
07-Aug-2023 14:02:13 0 0 0.75
07-Aug-2023 14:02:14 0 NaN 0.75
07-Aug-2023 14:02:15 0 0 0.75
07-Aug-2023 14:02:16 0 NaN 0.75
07-Aug-2023 14:02:17 0 NaN 0.75
07-Aug-2023 14:02:18 0 NaN 0.75
07-Aug-2023 14:02:19 0 NaN 0.75
07-Aug-2023 14:02:20 0 NaN 0.75
07-Aug-2023 14:02:21 0 NaN 0.75
07-Aug-2023 14:02:22 0 NaN 0.75
07-Aug-2023 14:02:23 0 NaN 0.75
07-Aug-2023 14:02:24 0 NaN 0.75
07-Aug-2023 14:02:25 0 NaN 0.75
07-Aug-2023 14:02:26 0 NaN 0.75
07-Aug-2023 14:02:27 0 NaN 0.75
07-Aug-2023 14:02:28 0 NaN 0.75
07-Aug-2023 14:02:29 0 NaN 0.75
07-Aug-2023 14:02:30 0 NaN 0.75
07-Aug-2023 14:02:31 0 NaN 0.75
07-Aug-2023 14:02:32 0 NaN 0.75
07-Aug-2023 14:02:33 0 NaN 0.75
07-Aug-2023 14:02:34 0 NaN 0.75
07-Aug-2023 14:02:35 0 NaN 0.75
07-Aug-2023 14:02:36 0 NaN 0.75
07-Aug-2023 14:02:37 0 NaN 0.75
07-Aug-2023 14:02:38 0 NaN 0.75
07-Aug-2023 14:02:39 0 NaN 0.75
07-Aug-2023 14:02:40 0 NaN 0.75
07-Aug-2023 14:02:41 0 NaN 0.75
07-Aug-2023 14:02:42 0 NaN 0.75
07-Aug-2023 14:02:43 0 NaN 0.75
07-Aug-2023 14:02:44 0 NaN 0.75
07-Aug-2023 14:02:45 0 NaN 0.75
07-Aug-2023 14:02:46 0 NaN 0.75
07-Aug-2023 14:02:47 0 NaN 0.75
07-Aug-2023 14:02:48 0 NaN 0.75
07-Aug-2023 14:02:49 0 NaN 0.75
07-Aug-2023 14:02:50 -125 0 -125
07-Aug-2023 14:02:51 0 0 0.0625
07-Aug-2023 14:02:52 0 0 0.4375
07-Aug-2023 14:02:53 0 0 0.75
07-Aug-2023 14:02:54 0 0 0.75
07-Aug-2023 14:02:55 0 0 0.75
07-Aug-2023 14:02:56 0 0 0.75
07-Aug-2023 14:02:57 0 0 0.75
07-Aug-2023 14:02:58 0 0 0.75
07-Aug-2023 14:02:59 0 0 0.75
2. Use the nearest State value that exists:
AllData = synchronize(Data1,Data2,Data3,Data1.Time,'nearest');
disp(AllData)
Time State_Data1 State_Data2 State_Data3
____________________ ___________ ___________ ___________
07-Aug-2023 12:52:00 0 0 0.8125
07-Aug-2023 12:52:01 0 0 0.8125
07-Aug-2023 12:52:02 0 0 0.8125
07-Aug-2023 12:52:03 0 0 0.8125
07-Aug-2023 12:52:04 0 0 0.8125
07-Aug-2023 12:52:05 0 0 0.8125
07-Aug-2023 12:52:06 0 0 0.8125
07-Aug-2023 12:52:07 0 0 0.8125
07-Aug-2023 12:52:08 0 0 0.8125
07-Aug-2023 12:52:09 0 0 0.8125
07-Aug-2023 12:52:10 0 0 0.8125
07-Aug-2023 12:52:11 0 0 0.8125
07-Aug-2023 12:52:12 0 0 0.8125
07-Aug-2023 12:52:13 0 0 0.8125
07-Aug-2023 12:52:14 0 0 0.8125
07-Aug-2023 12:52:15 0 0 0.8125
07-Aug-2023 12:52:16 0 0 0.8125
07-Aug-2023 12:52:17 0 0 0.8125
07-Aug-2023 12:52:18 0 0 0.8125
07-Aug-2023 12:52:19 0 0 0.8125
07-Aug-2023 12:52:20 0 0 0.8125
07-Aug-2023 12:52:21 0 0 0.8125
07-Aug-2023 12:52:22 0 0 0.8125
07-Aug-2023 12:52:23 0 0 0.8125
07-Aug-2023 12:52:24 0 0 0.8125
07-Aug-2023 12:52:25 0 0 0.8125
07-Aug-2023 12:52:26 0 0 0.8125
07-Aug-2023 12:52:27 0 0 0.8125
07-Aug-2023 12:52:28 0 0 0.8125
07-Aug-2023 12:52:29 0 0 0.8125
07-Aug-2023 12:52:30 0 0 0.8125
07-Aug-2023 12:52:31 0 0 0.8125
07-Aug-2023 12:52:32 0 0 0.8125
07-Aug-2023 12:52:33 0 0 0.8125
07-Aug-2023 12:52:34 0 0 0.8125
07-Aug-2023 12:52:35 0 0 0.8125
07-Aug-2023 12:52:36 0 0 0.8125
07-Aug-2023 12:52:37 0 0 0.8125
07-Aug-2023 12:52:38 0 0 0.8125
07-Aug-2023 12:52:39 0 0 0.8125
07-Aug-2023 12:52:40 0 0 0.8125
07-Aug-2023 12:52:41 0 0 0.8125
07-Aug-2023 12:52:42 0 0 0.8125
07-Aug-2023 12:52:43 0 0 0.8125
07-Aug-2023 12:52:44 0 0 0.8125
07-Aug-2023 12:52:45 0 0 0.8125
07-Aug-2023 12:52:46 0 0 0.8125
07-Aug-2023 12:52:47 0 0 0.8125
07-Aug-2023 12:52:48 0 0 0.8125
07-Aug-2023 12:52:49 0 0 0.8125
07-Aug-2023 12:52:50 0 0 0.8125
07-Aug-2023 12:52:51 0 0 0.8125
07-Aug-2023 12:52:52 0 0 0.8125
07-Aug-2023 12:52:53 0 0 0.8125
07-Aug-2023 12:52:54 0 0 0.8125
07-Aug-2023 12:52:55 0 0 0.8125
07-Aug-2023 12:52:56 0 0 0.8125
07-Aug-2023 12:52:57 0 0 0.8125
07-Aug-2023 12:52:58 0 0 0.8125
07-Aug-2023 12:52:59 0 0 0.8125
07-Aug-2023 12:53:00 0 0 0.8125
07-Aug-2023 12:53:01 0 0 0.8125
07-Aug-2023 12:53:02 0 0 0.8125
07-Aug-2023 12:53:03 0 0 0.8125
07-Aug-2023 12:53:04 0 0 0.8125
07-Aug-2023 12:53:05 0 0 0.8125
07-Aug-2023 12:53:06 0 0 0.8125
07-Aug-2023 12:53:07 0 0 0.8125
07-Aug-2023 12:53:08 0 0 0.8125
07-Aug-2023 12:53:09 0 0 0.8125
07-Aug-2023 12:53:10 0 0 0.8125
07-Aug-2023 12:53:11 0 0 0.8125
07-Aug-2023 12:53:12 0 0 0.8125
07-Aug-2023 12:53:13 0 0 0.8125
07-Aug-2023 12:53:14 0 0 0.8125
07-Aug-2023 12:53:15 0 0 0.8125
07-Aug-2023 14:01:14 -125 0 -125
07-Aug-2023 14:01:15 -125 0 -125
07-Aug-2023 14:01:16 -125 0 -125
07-Aug-2023 14:01:17 -125 0 -125
07-Aug-2023 14:01:18 -125 0 -125
07-Aug-2023 14:01:20 -125 0 -125
07-Aug-2023 14:01:21 -125 0 -125
07-Aug-2023 14:01:22 -125 0 -125
07-Aug-2023 14:01:23 -125 0 -125
07-Aug-2023 14:01:24 -125 0 -125
07-Aug-2023 14:01:25 0 0 0.125
07-Aug-2023 14:01:26 0 0 0.5
07-Aug-2023 14:01:27 0 0 0.75
07-Aug-2023 14:01:29 0 0 0.75
07-Aug-2023 14:01:30 0 0 0.75
07-Aug-2023 14:01:31 0 0 0.75
07-Aug-2023 14:01:32 0 0 0.75
07-Aug-2023 14:01:33 0 0 0.75
07-Aug-2023 14:01:34 0 0 0.75
07-Aug-2023 14:01:35 0 0 0.75
07-Aug-2023 14:01:36 0 0 0.75
07-Aug-2023 14:01:37 0 0 0.75
07-Aug-2023 14:01:38 0 0 0.75
07-Aug-2023 14:01:39 0 0 0.75
07-Aug-2023 14:01:40 0 0 0.75
07-Aug-2023 14:01:41 0 0 0.75
07-Aug-2023 14:01:42 0 0 0.75
07-Aug-2023 14:01:43 0 0 0.75
07-Aug-2023 14:01:44 0 0 0.75
07-Aug-2023 14:01:45 0 0 0.75
07-Aug-2023 14:01:46 0 0 0.75
07-Aug-2023 14:01:47 0 0 0.75
07-Aug-2023 14:01:48 0 0 0.75
07-Aug-2023 14:01:49 0 0 0.75
07-Aug-2023 14:01:50 0 0 0.75
07-Aug-2023 14:01:51 0 0 0.75
07-Aug-2023 14:01:52 0 0 0.75
07-Aug-2023 14:01:53 0 0 0.75
07-Aug-2023 14:01:54 0 0 0.75
07-Aug-2023 14:01:55 0 0 0.75
07-Aug-2023 14:01:56 0 0 0.75
07-Aug-2023 14:01:57 0 0 0.75
07-Aug-2023 14:01:58 0 0 0.75
07-Aug-2023 14:01:59 0 0 0.75
07-Aug-2023 14:02:00 0 0 0.75
07-Aug-2023 14:02:01 0 0 0.75
07-Aug-2023 14:02:02 0 0 0.75
07-Aug-2023 14:02:03 0 0 0.75
07-Aug-2023 14:02:04 0 0 0.75
07-Aug-2023 14:02:05 0 0 0.75
07-Aug-2023 14:02:06 0 0 0.75
07-Aug-2023 14:02:07 0 0 0.75
07-Aug-2023 14:02:08 0 0 0.75
07-Aug-2023 14:02:09 0 0 0.75
07-Aug-2023 14:02:10 0 0 0.75
07-Aug-2023 14:02:11 0 0 0.75
07-Aug-2023 14:02:12 0 0 0.75
07-Aug-2023 14:02:13 0 0 0.75
07-Aug-2023 14:02:14 0 0 0.75
07-Aug-2023 14:02:15 0 0 0.75
07-Aug-2023 14:02:16 0 0 0.75
07-Aug-2023 14:02:17 0 0 0.75
07-Aug-2023 14:02:18 0 0 0.75
07-Aug-2023 14:02:19 0 0 0.75
07-Aug-2023 14:02:20 0 0 0.75
07-Aug-2023 14:02:21 0 0 0.75
07-Aug-2023 14:02:22 0 0 0.75
07-Aug-2023 14:02:23 0 0 0.75
07-Aug-2023 14:02:24 0 0 0.75
07-Aug-2023 14:02:25 0 0 0.75
07-Aug-2023 14:02:26 0 0 0.75
07-Aug-2023 14:02:27 0 0 0.75
07-Aug-2023 14:02:28 0 0 0.75
07-Aug-2023 14:02:29 0 0 0.75
07-Aug-2023 14:02:30 0 0 0.75
07-Aug-2023 14:02:31 0 0 0.75
07-Aug-2023 14:02:32 0 0 0.75
07-Aug-2023 14:02:33 0 0 0.75
07-Aug-2023 14:02:34 0 0 0.75
07-Aug-2023 14:02:35 0 0 0.75
07-Aug-2023 14:02:36 0 0 0.75
07-Aug-2023 14:02:37 0 0 0.75
07-Aug-2023 14:02:38 0 0 0.75
07-Aug-2023 14:02:39 0 0 0.75
07-Aug-2023 14:02:40 0 0 0.75
07-Aug-2023 14:02:41 0 0 0.75
07-Aug-2023 14:02:42 0 0 0.75
07-Aug-2023 14:02:43 0 0 0.75
07-Aug-2023 14:02:44 0 0 0.75
07-Aug-2023 14:02:45 0 0 0.75
07-Aug-2023 14:02:46 0 0 0.75
07-Aug-2023 14:02:47 0 0 0.75
07-Aug-2023 14:02:48 0 0 0.75
07-Aug-2023 14:02:49 0 0 0.75
07-Aug-2023 14:02:50 -125 0 -125
07-Aug-2023 14:02:51 0 0 0.0625
07-Aug-2023 14:02:52 0 0 0.4375
07-Aug-2023 14:02:53 0 0 0.75
07-Aug-2023 14:02:54 0 0 0.75
07-Aug-2023 14:02:55 0 0 0.75
07-Aug-2023 14:02:56 0 0 0.75
07-Aug-2023 14:02:57 0 0 0.75
07-Aug-2023 14:02:58 0 0 0.75
07-Aug-2023 14:02:59 0 0 0.75