Question: Write a Matlab program (script or function or combination of both at your option) that simulates a two dimensional (x and y) trajectory of a

 Write a Matlab program (script or function or combination of bothat your option) that simulates a two dimensional (x and y) trajectoryof a mass, m, with a specified applied force. The state ofthis single mass system is given by the position and velocity: x,

Write a Matlab program (script or function or combination of both at your option) that simulates a two dimensional (x and y) trajectory of a mass, m, with a specified applied force. The state of this single mass system is given by the position and velocity: x, y, vx, vy. The core algorithm to update the state from values known at time step (n) to the next state at time step (n+1) is given by: x(n+1) = x(n) + dt * vx(n) y(n+1) = y(n) + dt* vy(n) vx(n+1) = vx(n) + dt * Ex(n)/m vy(n+1) = vy(n) + dt * Fy(n)/m Run your simulation for two sets of initial conditions and applied force: 1. Fx = 0; Fy=-9.8; x0 = 0; yO=0; vx0=2; vy0=10; m=1; For this case, find the value of x when y returns to zero. 2. Fx=0.5; Fy=-9.8; x0 = 0; yO=0; vx0 = 0; vy0 = 20; m = 1; Plot the resulting trajectory. Trajectory Simulation nf=1000 Analytics Velocity components vs time Velocity component 0. 51 1.5 225 Using 1000 time steps over 2.25 seconds provides sufficiently accurate results. A look at error associated with using larger time steps is shown in the next trajectory plot. The second homework condition results in the following trajectory and velocity time history: Trajectory Simulation Analytice 1000 Velocity components vs time Velocity component 0 0.5 1 1.5 2 2.5 3 3.5 4 4

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!