The picture you attached shows 5 decimal places of seconds. That is right at the boundary of accuracy possible with datenum; datenum cannot actually represent down to 10^-5 seconds, but it can represent to 1.0058E-5 seconds -- at least for modern times.
Your question, though, lists down to 10^-6 seconds, which definitely more accurate than datenum can justify.
My advice would be to use datetime() instead of datenum().
in_datestr = strcat(tab.carlog_date_final, {' '}, tab.carlog_time_final);
in_dates = datetime(in_datestr,'InputFormat', 'd-M-yyyy hh:mm:ss.SSSSS', 'Format', 'yyyy/MM/dd hh:mm:ss.SSSSS');
After that you can
seconds(diff(in_dates)) * 10^6
or as appropriate for the time scale you wish to pay attention to.
(Note: you do not actually need the 'Format' option for the datetime() call if you are only looking at the differences -- but it is nice to be able to debug that the milliseconds have been converted properly.)
Best Answer