Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB I NEED THE CODES FOR THIS ASSIGNMENT Write a MATLAB function called trajectory.m that computes the trajectory of a projectile launched at a specified

image text in transcribed

image text in transcribed

MATLAB

I NEED THE CODES FOR THIS ASSIGNMENT

Write a MATLAB function called trajectory.m that computes the trajectory of a projectile launched at a specified angle theta and initial velocity v. The function should return the horizontal and vertical position in feet of the projectile in question and the time array corresponding to those coordinates in seconds. Function Name: trajectory.mm Input Arguments: Angle in Radians (theta) Velocity in ft/sec (v) Optional Input Argument: Number of Points (default value is 100) Output Arguments: Horizontal motion trajectory in feet (x) Vertical motion trajectory in feet (y) Time array corresponding to x and y in seconds (t) . Velocity components can be found using trigonometric identities: Vx v cos(theta) Vy v*sin(theta) . Horizontal flight is as provided belovw Here, t ranges from 0 to time of flight (tf) where tf is computed using the below formula where g 32 ft/sec 2. Make sure t has linearly spaced values between 0 to tf based on the Number of points entered by the user (if not a default value of 100) . .Vertical flight is provided below y Vyt-0.5 gt2 Write a MATLAB function called trajectory.m that computes the trajectory of a projectile launched at a specified angle theta and initial velocity v. The function should return the horizontal and vertical position in feet of the projectile in question and the time array corresponding to those coordinates in seconds. Function Name: trajectory.mm Input Arguments: Angle in Radians (theta) Velocity in ft/sec (v) Optional Input Argument: Number of Points (default value is 100) Output Arguments: Horizontal motion trajectory in feet (x) Vertical motion trajectory in feet (y) Time array corresponding to x and y in seconds (t) . Velocity components can be found using trigonometric identities: Vx v cos(theta) Vy v*sin(theta) . Horizontal flight is as provided belovw Here, t ranges from 0 to time of flight (tf) where tf is computed using the below formula where g 32 ft/sec 2. Make sure t has linearly spaced values between 0 to tf based on the Number of points entered by the user (if not a default value of 100) . .Vertical flight is provided below y Vyt-0.5 gt2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

7. How will you encourage her to report back on the findings?

Answered: 1 week ago

Question

Were the decisions based on appropriate facts?

Answered: 1 week ago

Question

Were the right people involved in the decision-making process?

Answered: 1 week ago