Question: A Microsoft Excel file data has been provided. The file contains energy consumption data by energy source per year in the United States, measured in

A Microsoft Excel file data has been provided. The file contains energy consumption data by energy source per year in the United States, measured in petaBTUs. You need to write a program using matlab to read the Microsoft Excel file and store each column of data into different variables vectors or arrays. You may not hard-code these variablesthey should be imported from the Excel file to receive credit. Ask the user to choose a type of fuel from a menu (flexible to the data set), then generate the table below of fuel consumption by year using formatted output in the Command Window. Note the energy consumption should be displayed to two decimal places. Ask the user if they wish to select another type of fuel, or terminate the program. If the user wants to select again, then repeat, otherwise end program.

Coding Requirements: Load Excel Data

User menu for fuel type

Formatted output to Command Window

Flexible to different size data sets.

this is how the excel file looks like:

A Microsoft Excel file data has been provided. The file contains energy

the command window should look like that:

consumption data by energy source per year in the United States, measured

Year 2007 2006 2005 2004 2003 Fossil Fuels 101.605 99.861 100.503 100.351 98.209 Elec. Net Imports 0.106 0.063 0.084 0.039 0.022 Nuclear 8.415 8.214 8.16 8.222 7.959 Renewable 6.83 6.922 6.444 6.261 6.15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!