Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you please screenshot the way you solve it from matlab in both the script file and the function file as I'm trying to understand

image text in transcribed

can you please screenshot the way you solve it from matlab in both the script file and the function file as I'm trying to understand the question

Sample Problem 2: The x and y position of a projectile can be calculated as a function of time given an initial angle 8. Write a user defined MATLAB function using the following equations: x50 cos() vy 50 sin(e) xvxt 2 (angles are in radians) The inputs to the function are t and ; the outputs are x and y; and g-9.8 m/s. Name the function as q2 func. Write the function such that both t and 0 can be vectors (a) Use the function q2_func to calculate and display the value of x and y for t-24 and 50o (b) Use the function q2_func to calculate and plot x and y for 0 st s 7.8 in steps of 0.1 and 50. Title your figure with your student ID and use figure window 1 to display a plot of x vs t and y vs t on the same figure. Label axes appropriately and add a legend. Note: This question requires you to produce a function m-file (q2_func.m) and make calls to the user-defined function from your script file (from quiz2_studentiD.m file). No marks will be awarded if a function m-file is not produced

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions