Create a MATLAB function file that takes initial velocity, initial angle of firing, final time, and gravitational constant as inputs. As outputs, your function should return projectile x and y positions as a function of time. Create a script where you define the function inputs, call the function, and then use the function to plot projectile motion for the initial angle a from 20 to 70 in increments of 5, over a time from 0 to 45 seconds. Use your code to verify that for a projectile with an initial velocity of 800 ft/s, (xB,yB) = (12000, 2000) ft is attained for two initial angles of firing: a = 29.5° and a = 70°. This verification should be shown using a plot, with legend and x and y axis labels.

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question
100%

Matlab code please

(a) Create a MATLAB function file that takes initial velocity, initial angle of firing, final time, and
gravitational constant as inputs. As outputs, your function should return projectile x and y
positions as a function of time.
(b) Create a script where you define the function inputs, call the function, and then use the function
to plot projectile motion for the initial angle a from 20 to 70 in increments of 5, over a time
from 0 to 45 seconds.
(c) Use your code to verify that for a projectile with an initial velocity of 800 ft/s, (xB,yB) =
(12000, 2000) ft is attained for two initial angles of firing: a = 29.5° and a = 70°. This
verification should be shown using a plot, with legend and x and y axis labels.
800 ft/sec
12,000 ft
2,000 ft
Transcribed Image Text:(a) Create a MATLAB function file that takes initial velocity, initial angle of firing, final time, and gravitational constant as inputs. As outputs, your function should return projectile x and y positions as a function of time. (b) Create a script where you define the function inputs, call the function, and then use the function to plot projectile motion for the initial angle a from 20 to 70 in increments of 5, over a time from 0 to 45 seconds. (c) Use your code to verify that for a projectile with an initial velocity of 800 ft/s, (xB,yB) = (12000, 2000) ft is attained for two initial angles of firing: a = 29.5° and a = 70°. This verification should be shown using a plot, with legend and x and y axis labels. 800 ft/sec 12,000 ft 2,000 ft
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Design of Mechanical Springs
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY