Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Write a function that takes no arguments and returns 2 variables, mpg and car_model. The function will read the file porsche.xlsx and will get

MATLAB Write a function that takes no arguments and returns 2 variables, mpg and car_model. The function will read the file porsche.xlsx and will get ONLY the miles per gallon data (mpg) and the car line data (car_model). Find the car(s) with miles per gallon greater than 32. Create a new MS Excel file, mpg322007 with the selected data. If you have Matlab version 2016b, you can write the function on the same script as the main program and submit only one M-file. Lab_08_yourName.

Year MfrName CarLine Car_Truck EngDisp Police RatedHP Transmission Drive Weight Comp AxleRatio EVSpeedRatio AC PRP FuelType City_Highway HC CO CO2 NOX MPG Valves_Cyl CoastDownTime
2007 PORSCHE CAYMAN car 164 N 245 L5 R 3375 11.1 4.38 42.7 N 1 61 highway 0.008 0.15 245 36.2 6 17.47
2007 PORSCHE CAYMAN S car 207 N 295 L5 R 3500 11.1 4.16 40.5 N 1 61 highway 0.005 0.07 252 35.2 6 18.12
2007 PORSCHE CARRERA 2 COUPE car 220 N 325 L5 R 3625 11.3 3.56 41.4 N 1 61 highway 0.002 0.13 259 34.3 6 17.29
2007 PORSCHE CARRERA 2 S COUPE car 232 N 355 L5 R 3625 11.3 3.56 39.4 N 1 61 highway 0.002 0.06 265 33.5 6 17.29
2007 PORSCHE CARRERA 2 CABRIOLET car 220 N 325 M6 R 3625 11.3 3.44 40.2 N 1 61 highway 0.014 0.09 266 33.4 6 18.84
2007 PORSCHE CARRERA 4 CABRIOLET car 220 N 325 M6 4 3750 11.3 3.44 40.2 N 1 61 highway 0.021 0.12 266 33.4 6 18.08
2007 PORSCHE CARRERA 4 COUPE car 220 N 325 L5 4 3750 11.3 3.56 41.4 N 1 61 highway 0.005 0.09 268 33.2 6 16.78
2007 PORSCHE CARRERA 2 S CABRIOLET car 232 N 355 L5 R 3750 11.3 3.56 39.4 N 1 61 highway 0.01 0.08 270 32.9 6 17.89
2007 PORSCHE TURBO 4 911 TURBO car 220 N 480 L5 4 3875 9 3.82 35.9 N 1 61 highway 0 0.37 273 32.5 6 16.9
2007 PORSCHE CARRERA 4 S CABRIOLET car 232 N 355 L5 4 3875 11.3 3.56 39.4 N 1 61 highway 0.014 0.15 279 31.8 6 17.34
2007 PORSCHE CARRERA 4 S CABRIOLET car 232 N 355 M6 4 3750 11.3 3.44 39.7 N 1 61 highway 0.044 0.41 280 31.7 6 18.08
2007 PORSCHE GT3 911 GT3 car 220 N 415 M6 R 3500 12.1 3.44 41.7 N 1 61 highway 0.011 0.28 285 31.1 6 16.47

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

More Books

Students also viewed these Databases questions