how to convert absolute time to real time and calculate the sampling rate
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
NGR MNFD
am 25 Okt. 2023
Kommentiert: NGR MNFD
am 26 Okt. 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 Kommentare
Akzeptierte Antwort
Les Beckham
am 25 Okt. 2023
Bearbeitet: Les Beckham
am 25 Okt. 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 Kommentare
Voss
am 25 Okt. 2023
load metaData_Depth
C = num2cell(vertcat(metaData_Depth.AbsTime),1);
dt = datetime(C{:})
delta_t = dt - dt(1)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!