Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use MATLAB 3.2 The cost per mile for a helicopter is $2.50 for the first 10 miles, $3.00 for the next 40 miles, and $5.00

Use MATLAB

image text in transcribed

3.2 The cost per mile for a helicopter is $2.50 for the first 10 miles, $3.00 for the next 40 miles, and $5.00 for all miles in excess of 50 miles. It is not allowed to have longer miles than 100 miles. Write a MATLAB script file to ask a user to input the starting location from the base and the ending location from the base. Then compute the distance traveled and output the total cost. Show the script file and the results of testing the following three cases. Test 1: Start at 33 miles from the base and end at 95 miles from the base. (Distance = 95 -33) Test 2: Start at 80 miles from the base and end at 159 miles from the base. (Distance = 159 -80) Test 3: Start at 55 miles from the base and end at 160 miles from the base.(Distance = 160 -55)

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 Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

Students also viewed these Databases questions