Question: Homework problem referring to Matlab 0 where g is the acceleration due to gravity (-9.81 m/s), h is the height above the surface of the
0 where g is the acceleration due to gravity (-9.81 m/s), h is the height above the surface of the Earth, and V is the vertical component of velocity. Write a .m file (script file) that prompts a user for the initial height of the ball in meters and velocity of the ball in meters per second, and plots the height and velocity as a function of time. Create each plot in a separate figure with time values varying from 0 to 30 seconds with a minimum of 200 values. Be sure to include proper labels and titles. Problem 3 (15 points): MATLAB script-3 Create a m file (script file) that will plot a function and it's derivative on the same plot f(x) = sin 2x a -sin 2x = 2 cos 2x. dt Use x = 0:: 2 for the x values and calculate the y values for both functions. Change the line types (not points) so they are different line types and different colors. Be sure to include an appropriate title, axis labels, and legend. 1 100 Problem 4 (10 points): MATLAB script-4 The cost per mile for a rented vehicle is S1.00 for the first 100 miles, S0.80 for the next 200 miles and S0.70 for all miles in excess of 300 miles. Write a m file that determines the total cost and the ut ner mily for a tven number of miles (stored in a variable distance). Use the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
