how to convert absolute time to real time and calculate the sampling rate
26 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
NGR MNFD
el 25 de Oct. de 2023
Comentada: NGR MNFD
el 26 de Oct. de 2023
Hello to all...In this file, I have the absolute time and date and day of data registration. Now I want to get the real time and calculate the sampling rate from the difference of the frames with each other and their inverse. I have a problem with the MATLAB code. In the first step, I don't know how to calculate the real time and do the next steps? Help me please. Thanks a lot
0 comentarios
Respuesta aceptada
Les Beckham
el 25 de Oct. de 2023
Editada: Les Beckham
el 25 de Oct. de 2023
load metaData_Depth
fn = @(s) datetime(s.AbsTime);
dt = arrayfun(fn, metaData_Depth)
delta_t = seconds(diff(dt))
max(delta_t)
min(delta_t)
numel(unique(delta_t))
mean(delta_t)
std(delta_t)
plot(delta_t, '.')
grid on
So, every single sample has a different duration of time between it and the next sample. Thus, it isn't going to make much sense to calculate a sample rate for this data.
7 comentarios
Voss
el 25 de Oct. de 2023
load metaData_Depth
C = num2cell(vertcat(metaData_Depth.AbsTime),1);
dt = datetime(C{:})
delta_t = dt - dt(1)
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!