Fitting real data curve to a homogeneous diff
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Daniel Sánchez Muñoz
il 16 Mag 2023
Commentato: Star Strider
il 28 Mag 2023
Hello! I measured accelerations with matlab Mobile and I encountered the problem that the time step was not homogeneous and therefore the measured frequency. Therefore, I created a homogeneous diff (blue curve) and I would like to find a code in MATLAB that adapts the measured function with the real values (red curve) to that homogeneous time increment.
I attach a picture of the problem.
0 Commenti
Risposta accettata
Star Strider
il 16 Mag 2023
8 Commenti
Star Strider
il 28 Mag 2023
I would appreciate it if you would accept my answer.
I actually use the most common frequency, that I derive from the differences in the sampling intervals. I use mean, I also could have used mode.
I notice the the code you posted uses ‘fs’ to define ‘dt’ without first defining ‘fs’. I have no idea how you define ‘fs’.
I also use resample instead of interp1 because resample uses an anti-aliasing filter. This is important for signal processing applications, and signal processing is apprarently what you want to do.
The resample function also has the 'spline' option as an interpolation method. I rarely use it (preferring 'pchip') because it can give some wildly varying results.
.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Multirate Signal Processing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!