Question: Mathlab The free-falling bungee jumper problem introduced in module one involves obtaining a solution of dv g dt Ca v? m Using the finite difference
Mathlab


The free-falling bungee jumper problem introduced in module one involves obtaining a solution of dv g dt Ca v? m Using the finite difference approximation for dv/dt, this expression can be rewritten as v(t, -1) = v(t;) +(g- du(t;)2) (t,-- t;) dv Vi+1 = Vi + t dt In which dy cdu = 9 dt m Download the DragModelDemo.m from Module 1 of Canvas. With your partner, discuss how the script is written to provide numerical solution for the Bungee Jumper problem. Focus on the part where the for-loop exists. Afterward write your own MATLAB script to calculate the velocity of the bungee jumper. This script will first ask the users to input the numerical value for mass, drag coefficient, initial time, final time, time increment, and initial velocity. This script should include a for-loop and a function called "deriv that will calculate the derivative of the velocity with respect to time (dv/dt). This function will take input of velocity, drag coefficient, mass, and gravitational constant, and give output of the calculation of the derivative. Test your script on the following test cases (start with test case #1 and #3 first, then test the case #2). Discuss your results and analyze how time increment affects the results. Mass (kg) Drag coefficient (kg/m) Initial time (s) Input Final time (s) Time increment (s) Initial velocity (m/s) Output Final velocity (m/s) Test Case #1 Test Case #2 68.1 68.1 0.25 0.25 0 0 12 12 0.5 0.35 0 0 50.926 50.835 Test Case #3 68.1 0.25 0 12 0.001 0 50.618 Save your MATLAB script using file name BungeeJumper2FL_LA2 and save as the script with a different file name (BungeeJumper2WL_LA2). Afterward, replace the for-loop with while-loop. To break the while-loop, you will need a conditional statement that break the loop when the time is larger than or equal to final time. Test your script with the above test cases. Compare and discuss the results for the for-loop and while-loop cases
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
