Matlab program which will determine your vehicle fuel usage

Assignment Help MATLAB Programming
Reference no: EM13166250

Create a MATLAB program which will determine your vehicle fuel usage (MPG, miles/gallon) rating for a user defined number of trips ('for' repetition structure). Review the voiceover supplied for an example of the required input/output from this program. This includes max and min MPG ratings and the trips during which they occurred.

Write a MATLAB program which converts a user-entered temperature value into Celsius, Fahrenheit, Kelvin and Rankine values. The user must input temperature in either 'C' or 'F'. If the input temperature is less than zero Celsius, display the message 'freezing'; if above 40 C 'very hot'; if above 100 C 'boiling'; if below zero Kelvin or zero Rankine display 'impossible'. If the user does not enter either 'C' or 'F' with their temperature input the program should output a message indicating that Kelvin is assumed. This might involve the use of a 'logical' operator (and, or ,not; &,|,~) for exampl

if units~='C' & units ~= 'F'
        fprintf('you did not enter correct units, Kelvin assumed\n')

Revise your C-F-K-R temperature conversion program to allow an indeterminate number of repetitions (via 'while' structure. The user should be asked 'Do you wish to repeat this program'. ) In addition to the original program output, the program should determine and output the average temperature as well as the maximum and minimum temperatures converted



Reference no: EM13166250


Write a Review


MATLAB Programming Questions & Answers

  Write the command and assign it to variable

Write the command and assign it to variable , Write a function named function_test

  Computes the stiffness matrix for one bilinear element with

write Matlab code that computes the stiffness matrix for one bilinear element with 4 nodes

  Import the data into matlab and name the array ace_data

Parameter is related to the energy of the storm, since kinetic energy is proportional to velocity squared. However, it does not take into account the size of the storm, which would be necessary for a true total energy estimate.

  Stepper motor driven xy table

Stepper Motor Driven XY Table - Use Matlab and Labjack to acquire digital inputs from limit switches and use Matlab to analyze acquired data

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Travelling salesman problem involves

The Travelling Salesman problem involves a salesman who has to visit a number of cities in a single closed tour. The salesman always starts and ends the tour in his home city and visits each other city on the tour exactly once.

  Value for the side of the octagonal prism

Value for the side of the octagonal prism, and a scalar value for the height of the octagonal prism. Generate the x,y,z arrays that define the 9 faces of the pyramid (octagonal base and 8 triangles. Use fill3 command to create the faces (faces wit..

  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.

  Generate by means data.m an array

Generate by measdata.m an array A withsize (365,24), containing temperature measurements for an entire year [1 January,..., 31 December], 24 hours a day [00.00h,...,23.00h].

  One-dimensional steady-state heat flow

A one-dimensional steady-state heat flow, the mathematical formulation of problem - find out the temperature differences at each locations and calculate the temperatures at each locations

  Write a system program for bus arbiter

The bus arbiter is a device used in multi-master system with shared bus. It is used to allocate the control of the shared system bus to one master at a time depending priority.

  Kerfuffleboard is a game very much like shuffleboard

Kerfuffleboard is a game very much like Shuffleboard. Players take turns shooting disks at a trianglular scoring area. While the scoring areas are the same in shuffleboard and kerfuffleboard, a disk's contribution to a player's score will be calcu..

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