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.
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
Related questions
Question
100%
Matlab code please
![**Projectile Motion with MATLAB: Instructions and Verification**
**(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 α 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, \((x_B, y_B) = (12000, 2000)\) ft is attained for two initial angles of firing: \(\alpha = 29.5^\circ\) and \(\alpha = 70^\circ\). This verification should be shown using a plot, with legend and x and y axis labels.
---
**Diagram Explanation:**
- **Figure Description:** The image includes a projectile motion diagram. The projectile is launched from point A with an initial speed of 800 ft/s at angles α (29.5° and 70°).
- **Trajectory:** The path is shown forming an arc and reaching point B, which is located 12,000 feet horizontally and 2,000 feet vertically from the starting point A.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F858aa5e1-ece8-4a67-a0a4-477ec4c5e9a9%2Fe89ba6f7-8938-4c11-b687-f0bb23f61849%2F81hi2a_processed.jpeg&w=3840&q=75)
Transcribed Image Text:**Projectile Motion with MATLAB: Instructions and Verification**
**(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 α 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, \((x_B, y_B) = (12000, 2000)\) ft is attained for two initial angles of firing: \(\alpha = 29.5^\circ\) and \(\alpha = 70^\circ\). This verification should be shown using a plot, with legend and x and y axis labels.
---
**Diagram Explanation:**
- **Figure Description:** The image includes a projectile motion diagram. The projectile is launched from point A with an initial speed of 800 ft/s at angles α (29.5° and 70°).
- **Trajectory:** The path is shown forming an arc and reaching point B, which is located 12,000 feet horizontally and 2,000 feet vertically from the starting point A.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Elements Of Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
![Mechanics of Materials (10th Edition)](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
![Thermodynamics: An Engineering Approach](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
![Elements Of Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
![Mechanics of Materials (10th Edition)](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
![Thermodynamics: An Engineering Approach](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
![Control Systems Engineering](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
![Mechanics of Materials (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
![Engineering Mechanics: Statics](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY