Question: Write a MATLAB function called computeRange that uses trebuchetSim to compute the location and velocity of the projectile when it is released from the
Write a MATLAB function called computeRange that uses trebuchetSim to compute the location and velocity of the projectile when it is released from the trebuchet and feeds these conditions into projectileSim to compute the distance the projectile travels. The function must be called computeRange. The function must take four input arguments: m. 1. 0(t = 0), and the sling release angle e in units of kilograms, meters and degrees. The function must return a single argument: the distance in meters that the projectile travels. If either computeRange or trebuchet Sim return an error, computeRange must return a distance value of zero. The function must use default model parameters of: h= -20 m (the ground is 20 m below the trebuchet axle), g = 9.8 m/s, and drag parameter of d = 0.01 N.s/m.
Step by Step Solution
3.48 Rating (151 Votes )
There are 3 Steps involved in it
The question involves writing a MATLAB function named computeRange that utilizes another function presumably named trebuchetSim to simulate the motion of a trebuchetprojected object and compute the di... View full answer
Get step-by-step solutions from verified subject matter experts
