Plot length of time between two events
Ältere Kommentare anzeigen
I have a table with 3 columns: Sensor ID, Start Time, Stop Time, like this:
2 '20 Mar 2023 18:01:24.318' '20 Mar 2023 18:14:29.431'
2 '20 Mar 2023 20:01:17.651' '20 Mar 2023 20:13:36.931'
2 '21 Mar 2023 06:23:12.515' '21 Mar 2023 06:37:34.666'
2 '21 Mar 2023 08:25:49.680' '21 Mar 2023 08:34:08.341'
3 '20 Mar 2023 23:09:56.209' '20 Mar 2023 23:23:32.154'
3 '21 Mar 2023 01:17:08.676' '21 Mar 2023 01:31:28.003'
3 '21 Mar 2023 10:20:17.002' '21 Mar 2023 10:22:52.180'
3 '21 Mar 2023 12:21:13.756' '21 Mar 2023 12:37:30.450'
4 '20 Mar 2023 16:50:51.910' '20 Mar 2023 16:53:08.560'
4 '21 Mar 2023 01:11:16.404' '21 Mar 2023 01:19:06.159'
4 '21 Mar 2023 03:07:32.598' '21 Mar 2023 03:22:05.176'
4 '21 Mar 2023 13:31:47.726' '21 Mar 2023 13:43:56.867'
4 '21 Mar 2023 15:30:50.827' '21 Mar 2023 15:43:57.428'
And I want to plot, the sensor number on the y axis, and in the x axis the length or time between start time and stop time. Basically, I need like a horizontal error bar, where the "error" is the time between start and stop time.
I can create this "error" and plot, but I was wondering if there was an easier/mote straight forward way of doing.
Here is an example of the plot I want:

Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Data Type Conversion finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!