Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab. The time dependent height, h, and horizontal distance, x, a projectile travels can be described by the following functions: h(t) = vtsin theta -

Matlab. image text in transcribed

The time dependent height, h, and horizontal distance, x, a projectile travels can be described by the following functions: h(t) = vtsin theta - 1/2 gt^2 x(t) = vtcos theta where time, t is in seconds, velocity, v, is in m/s, the angle of launch, theta, is in radians, and acceleration due to gravity, g, is 9.8 m/s^2. a. Open a new script in MATLAB. b. Define the acceleration due to gravity. c. Use colon notation to create a vector, t, containing values of time from 0 to 10 seconds in increments of 0.1 s. d. Use the input function to ask the user to input a velocity between 1 and 100 m/s and a launch angle between 0 and 90 degrees; assign these values to variables v and theta, respectively. e. Convert theta to radians using the following line of code: theta = theta*pi/180;. f. Use the MATLAB built-in function length() to calculate the number of values in the vector t, and assign this length to the variable len_t. g. Use a single for loop to calculate vectors of height, h, and horizontal distance, x for each time value in the vector t. Begin the for loop with for i = 1:len_t, so that i represents the position in each vector. h. Use subplot and plot to produce three plots, h vs t, x vs t, and h vs x, on a single page. Label all axes and include descriptive plot titles. i. Run your script using a launch angle of 40 degree and a velocity of 65 m/s. Print the figure produced and draw by hand on the printout where the plots are no longer physically meaningful

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions