Expanding Matrix with Integers (between decimal numbers)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Orkun OZENER
el 21 de Sept. de 2017
Comentada: Orkun OZENER
el 21 de Sept. de 2017
Hi I have two vector one is time the other one is velocity. Because of GPS logging freq.I am having decimal numbers. Also when the car stops the gps stop logging. So I want to add integers to time matrix, and will ad corresponding interpreted velocities to the velocity matrix.
Like:
T=[ 39.01; 41 ;43.13;45; 47.02] V=[19.47;9;11.84;13.35;11.70]
So I should have the new T
T_new=[ 39.01; 40; 41 ; 42;43.13; 44;45; 46; 47.02]
V_new=[ 19.47; interp_new_val;9; interp_new_val,11.84; interp_new_val;13.35; interp_new_val;11.70]
And the nest one after this,
How can I form for example 5hz time-veloicty data from this data? Starting from zero.
Kind Regards
0 comentarios
Respuesta aceptada
Más respuestas (1)
Jos (10584)
el 21 de Sept. de 2017
Almost there, use the function interp1:
T = [ 39.01; 41 ;43.13;45; 47.02]
V = [19.47;9;11.84;13.35;11.70]
T_new=[ 39.01; 40; 41 ; 42;43.13; 44;45; 46; 47.02]
V_new = interp1(T, V, T_new)
Ver también
Categorías
Más información sobre Multirate and Multistage Filters en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!