Borrar filtros
Borrar filtros

How do I calculate velocity with v= v0+a*t for loop?

3 visualizaciones (últimos 30 días)
tseng chiayi
tseng chiayi el 4 de Mayo de 2020
Respondida: Mathias Andersen el 4 de Mayo de 2020
I am analyzing data from an accelerometer. I first calculated the Aall,than calculate velocity with v= v0+a*t for loop,but can't doing.
A=1:1:50;
Aall=A*9.8;
t=0.1:0.1:5;
for i=1;length(t)
Ve=0;
Ve=Ve+Aall(i)*t;
V(i)=Ve;
end

Respuestas (1)

Mathias Andersen
Mathias Andersen el 4 de Mayo de 2020
You need to use : instead of ; in the for loop values, and V(i) = Ve(i)

Categorías

Más información sobre MATLAB Mobile en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by