Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

include proper comments Problem 2 (15 points): MATLAB script-2 If a stationary ball is released at a height of ho above the surface of the

image text in transcribed
include proper comments image text in transcribed
image text in transcribed
Problem 2 (15 points): MATLAB script-2 If a stationary ball is released at a height of ho above the surface of the Earth with a vertical velocity Vo, the position and velocity of the ball as a function of time will be given by the equations: 1 h(t) = 1 g+++V+++ ho v(t) = got+V 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 4 (15 points): MATLAB script-4 The cost per mile for a rented vehicle is $1.00 for the first 100 miles, $0.85 for the next 200 miles, and $0.65 for all miles in excess of 300 miles. Write a .m file that determines the total cost and the average cost per mile for a given number of miles (stored in a variable distance). Use the following fprintf statement as an output: "For a total distance of XX.X miles, the total cost is $XXX.XX and the average cost per mile is $X.XX." Sample Input/Output Enter the total miles traveled: 515 For a total distance of 515.0 miles, the total cost is $409.75 and the average cost per mile is $0.80. Problem 6 (20 points): MATLAB script-6 Create a m file (script file) that will evaluate the given function f(x,y) (Note: This is not a function as MATLAB considers one, yet a mathematical function.) for any two user specified values x and y. The function is defined as follows: (x+y x > 0 and y20 x + y2 x 0 and y

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 Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

LO1.2 Describe the role of economic theory in economics.

Answered: 1 week ago