Question: My Solutions MATLAB model with drag force Background: You will be using a MATLAB Med i c ated to predict the path of the propongal

 My Solutions MATLAB model with drag force Background: You will be
using a MATLAB Med i c ated to predict the path of

My Solutions MATLAB model with drag force Background: You will be using a MATLAB Med i c ated to predict the path of the propongal Since the drag force due to the was opposes the motion of the ball, the system can not be modeled in a closed forway in a closed for solution you can write an tion and solve instead this has to be done in alterative son Your Task Copy the code into a to open and review it. Here are the parts: V . Use the comes to figure out w here Student developed code A section for you to putcode that uses a while loop to calculate the motion of the ping pong ball The spaces that nood code are called out with and a hint inside about what is missing Note the variable names suggested in these so that the rest of the code wil wokonce those things are added Ploting of final values. This plot should look like the following Script Save Rest MATLAB Documentation 2 Create a program te plot the notion of the ping pong ball with drag. The program will take inputs for velocity in ws and angle of launch sote that with a high speed camera estated a tanch speed for a ping pong ball could be s. 4 angle-60 convert the degrees into radians se MATLAB likes it anglesangle pi/180 11 set initial values itine, distance, ass, gravity, drag! 11 1.01; meters 14 time(1); sconds 15 mass, 60247; in pon ball .00247 kg 17 .0205: 16 Index coefficient of drag with density and area in this constant I can toad an array for platting 20 start to increment the motion and define it component forces 21 vetxevelecos Cangte): > velywvelesin angle); Settine step and variable for height 27 deltats .001; seconds 20 heighty(1) while height check that the ball has not hit around yet indexindex+1; setup and index break velocity into its components use anelse statement to check to see if the allow down negative). It it is, the drag has an opposite sig as gravity in the acceleration formula. Otherwise gravity and drag have the same sign. Calculate the new acceleration in the ya u l tete statement to check to see the ball 15 novine do negative. It is then drag has an opposite son as gravity in the acceleration formula Otherwise gravity and drag have the same sign. Calculate the new acceleration in they Now calculate the acceleration in the calculate the new velocity at the end of the tine step this will have X and Y components, you need a variable for each one is velFinax and the other is veFinal. Get a new velocity vector and angle given the X and Y The velocity is the variable "vel and angle is angle Savery values at this time step time Indexinelindex-1) deltaTime: Velocity index) ve Final Velocity index) ve Finale; distXuvedeltaTime: distywvelyedettamine; save distance values xindexindex-1) dist; ylindex) wylinder-11.disty: heighty index: s plot.) 79 tittel distance traveled by ping pong ball in meters xlabel('horizontal distance traveled meters ) 81 yLabel(vertical distance traveled meters) Assessment: Gravity is assigned to -0.3 Mass-mass assigned to 0.00247 time-should be a vector with the size of 1x2371 double Velocity should be a vector with the size of 1x2371 double Velocity should be a vector with the size of 1x2371 double y values should be a vector with the size of 1x2371 double x values should be a vector with the side of 1x2371 double My Solutions MATLAB model with drag force Background: You will be using a MATLAB Med i c ated to predict the path of the propongal Since the drag force due to the was opposes the motion of the ball, the system can not be modeled in a closed forway in a closed for solution you can write an tion and solve instead this has to be done in alterative son Your Task Copy the code into a to open and review it. Here are the parts: V . Use the comes to figure out w here Student developed code A section for you to putcode that uses a while loop to calculate the motion of the ping pong ball The spaces that nood code are called out with and a hint inside about what is missing Note the variable names suggested in these so that the rest of the code wil wokonce those things are added Ploting of final values. This plot should look like the following Script Save Rest MATLAB Documentation 2 Create a program te plot the notion of the ping pong ball with drag. The program will take inputs for velocity in ws and angle of launch sote that with a high speed camera estated a tanch speed for a ping pong ball could be s. 4 angle-60 convert the degrees into radians se MATLAB likes it anglesangle pi/180 11 set initial values itine, distance, ass, gravity, drag! 11 1.01; meters 14 time(1); sconds 15 mass, 60247; in pon ball .00247 kg 17 .0205: 16 Index coefficient of drag with density and area in this constant I can toad an array for platting 20 start to increment the motion and define it component forces 21 vetxevelecos Cangte): > velywvelesin angle); Settine step and variable for height 27 deltats .001; seconds 20 heighty(1) while height check that the ball has not hit around yet indexindex+1; setup and index break velocity into its components use anelse statement to check to see if the allow down negative). It it is, the drag has an opposite sig as gravity in the acceleration formula. Otherwise gravity and drag have the same sign. Calculate the new acceleration in the ya u l tete statement to check to see the ball 15 novine do negative. It is then drag has an opposite son as gravity in the acceleration formula Otherwise gravity and drag have the same sign. Calculate the new acceleration in they Now calculate the acceleration in the calculate the new velocity at the end of the tine step this will have X and Y components, you need a variable for each one is velFinax and the other is veFinal. Get a new velocity vector and angle given the X and Y The velocity is the variable "vel and angle is angle Savery values at this time step time Indexinelindex-1) deltaTime: Velocity index) ve Final Velocity index) ve Finale; distXuvedeltaTime: distywvelyedettamine; save distance values xindexindex-1) dist; ylindex) wylinder-11.disty: heighty index: s plot.) 79 tittel distance traveled by ping pong ball in meters xlabel('horizontal distance traveled meters ) 81 yLabel(vertical distance traveled meters) Assessment: Gravity is assigned to -0.3 Mass-mass assigned to 0.00247 time-should be a vector with the size of 1x2371 double Velocity should be a vector with the size of 1x2371 double Velocity should be a vector with the size of 1x2371 double y values should be a vector with the size of 1x2371 double x values should be a vector with the side of 1x2371 double

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!