Determine the total cost and the average cost per mile

Assignment Help MATLAB Programming
Reference no: EM132217518

Question: If x is greater than or equal to zero, then assign the squareroot of x to the variable squareroot _ x and print out the result. Otherwise, print out an error message about the argument of the squareroot function and set squareroot _ x equal to zero.

The cost per mile for a rented vehicle is $1.25 for the first 100 miles, $0.75 for the next 200 miles, and $0.70 for all miles in excess of 300 miles. Write MATLAB statements that determine the total cost and the average cost per mile for a given number of miles (stored in the variable distance).

Reference no: EM132217518

Questions Cloud

Create two use cases for the school bus system : The bus operation involves 30 regular routes, plus special routes for activities, athletic events, and summer sessions.
Explain how risk management could contribute : Fundamentals of risk management - Describe benefits of achieving risk maturity in thé tisk management pracess in the merged insurance broker
Write a procedure that accepts two null terminated strings : Write a procedure that accepts 2 null terminated strings and returns 1 if they are equal or 0 otherwise.
Prepare the adjusting entries for the items : The unadjusted trial balance for Sierra Corp. is shown in Illustration 4-4. Instead of the adjusting entries shown in the text at October 31.
Determine the total cost and the average cost per mile : The cost per mile for a rented vehicle is $1.25 for the first 100 miles, $0.75 for the next 200 miles, and $0.70 for all miles in excess of 300 miles.
Determine the median of this set of 2n values : Determine the median of this set of 2n values, which we will define here to be the nth smallest value.
Create two use cases for the school bus system : The X School operates 40 buses that serve approximately 1,000 students in grades K-12. The bus operation involves 30 regular routes, plus special routes.
Write a class classroom that extends room : A Room class contains an int instance variable for the area (in square feet) of the room one constructor that takes the area of the room.
Design an algorithm for an xml document : An XML document is a plain text file containing opening and closing tags that semantically mark-up pieces of data. Further, tags can be nested as many levels.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Z-transform in matlab

Z-Transform in MATLAB, Sketch the z-plane pole-zero plot and determine the stability status for the following digital system. Determine the h(n) in MatLab.

  What is a super-efficiency model

What is a super-efficiency model - distinguish the performance of best-practice DMUs

  Plot the pressure surface versus latitude and longitude

Plot the pressure surface versus latitude and longitude as a surface plot

  How do you create a new script or function in matlab

What is the difference between a script and function. How do you create a new script or function in MATLAB

  Design a pid controller using matlab simulink

Determine the closed-loop step response using MATLAB for a system with unity feedback - Design a PID controller using MATLAB Simulink/code

  Matlab program to compute how much money will accumulate

Write a MATLAB program to compute how much money will accumulate in 5 years in the account and in any CDs you buy. Run the program for two different savings interest rates: 4 percent and 5 percent.

  If the model tests are to be performed in a wind tunnel

the fluid dynamic characteristics of an airplane flying 240 mph at 10000 ft are to be investigated with the aid of a

  Make a nichols plot of your systems response.

MECH 436 - Applied Controls. For this laboratory you will some of the tools from the Control Systems Toolbox in MATLAB to help visualize a systems open and/or closed loop response. Make a Nichols plot of your systems response. Make a Zero-Pole plot..

  Calculate natural frequency and damping ratio

Set up the quasi-steady equations of motion for a pitching and plunging 2D flat plate. Calculate natural frequency and damping ratio. Plot the variation of the natural frequencies and damping ratios of your system with airspeed

  Calculate the derivative of the function by hand

Calculate the derivative of the function by hand. Write a MATLAB function that calculates the derivative of this function and calculate the derivative at x = 0.5.

  Draw the set x on a two-dimensional plane

Draw the set X on a two-dimensional plane and draw the set Yon a two-dimensional plane. Comment on the mapping - Draw the set Z on a two-dimensional plane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd