Acceleration, velocity, distance .. fastest calculation method please
Ältere Kommentare anzeigen
Hi,
Knowing the velocity x in m/s, acceleration y in m/s^2, and duration of acceleration t in seconds, I will want to calculate distance travelled during time period t and velocity at the end of that time period t.
I'm going to need to do this a lot of times (potentially order of 1E10 times).
Please can anyone tell me what they think the likely fastest way to do this in matlab would be and why it's likely to be fastest.
Many thanks in advance.
6 Kommentare
KSSV
am 15 Jun. 2018
Are you going to use:
s = u*t+1/2*a*t^2
Keith Elliott
am 15 Jun. 2018
Guillaume
am 15 Jun. 2018
There must be something that you haven't explained here. Knowing initial velocity and acceleration and knowing the duration, it's trivial to calculate distance traveled and final velocity. It's just simple multiplications and sums, you don't need a solver for that.
Keith Elliott
am 15 Jun. 2018
Bill Greene
am 15 Jun. 2018
I suggest reading this chapter from Cleve Moler's book to get an introduction to this topic: Numerical Computing with MATLAB. This introduction will help explain why MATLAB has a variety of methods for ODE solution and why you almost certainly don't want to write your own.
Keith Elliott
am 15 Jun. 2018
Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!