MATLAB: (Projectile Motion) Finding mass (m) drag coefficient(Cd) from a list of data

draghelpprojectile

Hello everyone,
I have an assignment on projectile motion. I need to find mass(m), drag coefficient(Cd) and firing angle from a data set that includes time, horizontal velocity, altitude. Do you have any idea or code help for this problem?

Best Answer

Yes.
1, Write an ODE for projectile motion in a gravitational field taking drag into account.
2, Run said ODE with ode45 for a couple of input-parameters to see that it works.
3, trial and error run to get as good a fit with your observed data.
4, if not good enough solution obtained write an error-function that automatically integrates the ODE with a given set of input-parameters (I figure, launch-angle, launch velocity, mass and drag-coefficient would be the parameters you fit for), that calculates the difference between the given points and the calculated trajectory.
5, minimize the error-function above using fminsearch.