Write a Matlab function called hw10.m that computes the maximum horizontal and v
ID: 3928073 • Letter: W
Question
Write a Matlab function called hw10.m that computes the maximum horizontal and vertical distance of a projectile and the total travel time, given the firing angle and initial velocity. Also, accept a third optional parameter that adjusts the gravitational constant (g = 9.8065 m2/s default). The angle input is degrees from horizontal, and velocity is m/s. You may need to consult a physics textbook or a reputable web resource such as https://en.wikipedia.org/wiki/Projectile_motion. Your function must do the following:
Explanation / Answer
function [x,y,t]=hw10(ang,ivel,g)
t=(2*ivel*sin(ang))/g
y=(ivel*ivel*(1-cos(2*ang)))/(2*g)
x=(ivel*ivel*sin(2*ang))/g
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.