 # More MatLab Woes

Not only did ME10 have a final project, but so did ME17 (the one with Excel and MatLab). Our final project asked us to write 1) A main file to determine the velocity and position of a space shuttle over a period of time by using 2) a function with constant drag force and 3) a function with a variable drag force.

Luckily, the equation for determining acceleration over a period of time with given constants was provided for us, so we didn’t need to think of that ourselves. The hard part was knowing how to write a main code that would call the function files that I wrote to print out the calculated y and V values.

It’s hard to express in word so I’ll just show you what I did. The main code calls the functions then prints and plots out the results of the ode45 function, the integration function. This function code calculates the velocity and acceleration when drag force varies with time. This does the same but with constant drag force. The result of running the code. It prints out a table of all the values and plots the velocity and position vs time graphs for an user inputted value for the mass of the shuttle.

Advertisements