# Converting velocity, time, and force data into acceleration

21 visualizzazioni (ultimi 30 giorni)
Anthony il 6 Gen 2014
Modificato: Youssef Khmou il 7 Gen 2014
Hello, I am working on a project and am running into a problem converting velocity data into acceleration data. I have velocity data from an ADV as well as force data from a ring transducer on a pile in a wave tank experiment. What would be the easiest way to obtain acceleration data to use in later codes (to obtain drag and inertia coefficients). Thank you.
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Risposte (2)

Laurent il 6 Gen 2014
Assuming that you have a time series of velocity values, you could just calculate the derivative of the velocity by using the command 'diff' and then dividing by the time difference between adjacent velocity values. Is this what you need?
##### 1 CommentoMostra NessunoNascondi Nessuno
Anthony il 6 Gen 2014
I think that works, thank you!

Accedi per commentare.

Youssef Khmou il 6 Gen 2014
Like Laurent said, a=diff(v)./diff(t), you compare that result with F/m with m being the mass of the considered system,
##### 3 CommentiMostra 2 commenti meno recentiNascondi 2 commenti meno recenti
Youssef Khmou il 7 Gen 2014
Modificato: Youssef Khmou il 7 Gen 2014
i never used gradient for velocity, but for 2D fields. i think diff is standard, while gradient needs to adjust the step h to be the same as Ts=1/Fs, as in this demo :
t=0:0.01:10;
v=2*t;
a1=diff(v)./diff(t);
a1(end+1)=a1(end);
plot(t,a1,t,a2,'r')
legend('diff(v(t))','\nabla v(t)');
if Ts is not known, its not convenient to use grad, !?

Accedi per commentare.

### Categorie

Scopri di più su Oceanography and Hydrology 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!

Translated by