Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using MATLAB Create a MATLAB *.m script file that will solve the following 2 problems. Use MATLAB array operations to solve the problems. When cars

image text in transcribed

Using MATLAB Create a MATLAB *.m script file that will solve the following 2 problems. Use MATLAB array operations to solve the problems. When cars burn one gallon of gasoline, 19.4 pounds of CO_2 (carbon dioxide) is produced. Suppose you have a group of cars that have the following fuel efficiencies (miles per gallon): 117 mpg, 42 mpg, 38 mpg, 33.3 mpg, 31 mpg, 28 mpg, 23 mpg and 18 mpg. Create a row vector containing the fuel efficiencies. Use the appropriate array operations to calculate the amount of CO_2 produced for each car if the cars were driven for the following distances given in miles: 15000 miles for the car with 117 mpg, 13500 miles for the car with 42 mpg, 14000 miles for the car with 38 mpg, 11000 miles for the car with 33.3 mpg, 12500 miles for the car with 31 mpg, 8000 miles for the car with 28 mpg, 9500 miles for the car with 23 mpg, and 4000 miles with the car with 18 mpg. The amounts of CO_2 should be stored in a row vector. The distance a free-falling object falls is given by the equation D = 1/2gt^2 where D is the distance, g is the constant 9.8 meters per second, and t is time in seconds. Using either the colon operator or the linspace function create a row vector for times from 0 to 3 minutes in 5 second intervals (increments). The row vector should include 0 and 180) Using MATLAB array operations, calculate another row vector that contains the distance the object fell for each time. Make sure that you script file contains the clear and clc MATLAB commands and includes comments that describe the problem, input (even if it has been given), output, and processing

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_2

Step: 3

blur-text-image_3

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

Calculate y'. xe y4 = y sin x

Answered: 1 week ago

Question

Describe the problems in the administration of disciplinary action.

Answered: 1 week ago