Writing a script for the Equation Of Motion

4 Ansichten (letzte 30 Tage)
Fergal Ahern
Fergal Ahern am 5 Sep. 2019
Kommentiert: Walter Roberson am 5 Sep. 2019
Hi,
I want to write a MATLAB script for the second equation of motion s=vo+1/2at^2. How would I approach this? Any help would be appreciated.
I am trying to simulate the trajectory of a bullet and I am finding it quite difficult as no values are assigned for conditions and therefore struggling as to where begin. Thank you

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 5 Sep. 2019
If you neglect friction from the air, then acceleration is g, 9.81 m/s, directed downwards.
V0 is the muzzle velocity; there is a whole Wikipedia article about muzzle velocities of various kinds of bullets. Pick one.
t is simulated time.
  5 Kommentare
Fergal Ahern
Fergal Ahern am 5 Sep. 2019
Thanks for your help. What code would I use to read in the muzzle velocity and the launch value?
Walter Roberson
Walter Roberson am 5 Sep. 2019
inputdlg() or just pass them as parameters to your function.
I suspect that you would be fine picking one particular common muzzle velocity such as for a 22 or a 303

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

darova
darova am 5 Sep. 2019
Some examples of throwing. MAybe you can find them usefull for your bullet simulation

Kategorien

Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by