Question: Write a program in Matlab to calculate the position of a projectile at a given time t. For the gravitational constant g and an initial

Write a program in Matlab to calculate the position of a projectile at a given time t. For the gravitational constant g and an initial velocity v and angle of departure , the position is given by x and y coordinates as follows:

x=vcos( )t

y=vsin()t-1/2 gt^2

The program should ask the user to input the initial velocity, time (>0), and angle of departure (in degrees: 0-360). All user input should have input validation. It should then call a function to find the x and y coordinates, and another function to print the results. Note: g=9.81

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!