Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
3rd Edition
ISBN: 9780133593211
Author: Elizabeth A. Stephan, David R. Bowman, William J. Park, Benjamin L. Sill, Matthew W. Ohland
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 18, Problem 30RQ

A sample of the data provided in the Microsoft Excel file EnergyData.xlsx online follows. The file contains energy consumption data by energy source per year in the United States, measured in petaBTUs.

Chapter 18, Problem 30RQ, A sample of the data provided in the Microsoft Excel file EnergyData.xlsx online follows. The file

a.    Write the MATLAB code necessary to read the Microsoft Excel file and store each column of data into different variables. Create the following:

  • Yr: A vector of all of the years in the worksheet.
  • FF: A vector of all of the fossil fuels for each year in Yr.
  • ENI: A vector of all electric imports for each year in Yr.
  • Nuc: A vector of all nuclear energy consumption for each year in Yr.
  • Ren: A vector of all renewable energy consumption for each year in Yr.
  • Hdr: A cell array of all of the headers in row 1.

You may not hard-code these variables—they should be imported from the Excel file.

b.    Create a new variable. Totalconsumption, which contains the sum of the four columns of energy consumption data for each year. In other words, since all five of the vectors (Yr, FF, ENI, Nuc, and Ren) we created in part (a) have the same length, the new variable, Totalconsumption, should have the same length. You may assume that you have correctly defined the variables in part (a).

c.    Calculate the average fossil fuel consumption in the entire data set. For this code, you may assume that you have correctly defined FF, the variable containing the fossil fuel consumption data, in part (a). Display the result of the calculation in the following format, where the number is shown to two decimal places:

The average fossil fuel consumption is _____ petaBTU.

Blurred answer
Students have asked these similar questions
Hello I’m trying to make the graph that you see in the picture, I’m trying the exact copy of that graph using this code but I’m having a hard time doing that. Could you change the code so that it looks like the graph that you see on the picture using MATLAB, please send the code when you are finished. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Fix the random seed for reproducibility rng(45); % Assumed positions of cars CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves pDiesel = polyfit(carPosition, CO2Diesel, 3); pPetrol = polyfit(carPosition, CO2Petrol, 3); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Plotting the data figure; hold on; scatter(carPosition, CO2Diesel, 'o', 'MarkerEdgeColor', [1 0.5…
I’m using this code in MATLAB but for some odd reason every time I run it on MATLAB I keep on getting a different graphs. In the picture that shows two different graphs are from the same code, but I need to it to look like the picture that has one graph. Could you please fix it. To make it look like the picture that has one graph? Here is the code: % Sample data for Diesel and Petrol carPosition = linspace(1, 60, 50); % Assumed positions of cars CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves pDiesel = polyfit(carPosition, CO2Diesel, 3); pPetrol = polyfit(carPosition, CO2Petrol, 3); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Plotting the data figure; hold on; scatter(carPosition, CO2Diesel, 'o', 'MarkerEdgeColor', [1 0.5 0]); % Diesel data…
My professor said that I need to use the numbers as shown on the picture and make the exact graph that is also shown on the picture. But I don’t know how to put this in to MATLAB. Please send the code that makes the graph that is shown in the picture. Make it 100% exactly the same.

Chapter 18 Solutions

Thinking Like an Engineer: An Active Learning Approach (3rd Edition)

Ch. 18 - Assume that a three-element row vector v already...Ch. 18 - The tiles on the space shuttle are constructed to...Ch. 18 - The specific gravity of acetic acid (vinegar) is...Ch. 18 - Write a MATLAB program that will allow a user to...Ch. 18 - Write a program that will allow the user to type a...Ch. 18 - In order to calculate the pressure in a flask,...Ch. 18 - Write a program that will allow the user to type...Ch. 18 - Write a MATLAB program that will ask users to...Ch. 18 - Write a program that asks a user to enter, one at...Ch. 18 - Joules first law, also known as the Joule effect,...Ch. 18 - Create a proper plot of the following set of...Ch. 18 - Prob. 17ICACh. 18 - You want to create a graph showing the theoretical...Ch. 18 - The decay of a radioactive isotope can be...Ch. 18 - Create a proper plot of the theoretical voltage...Ch. 18 - Plot the following functions as assigned by your...Ch. 18 - Plot the following functions as assigned by your...Ch. 18 - If an object is heated, the temperature of the...Ch. 18 - The resistance of a typical carbon film resistor...Ch. 18 - Today, most traffic lights have a delayed green,...Ch. 18 - Cadmium sulfide (CdS) is a semiconducting material...Ch. 18 - Your supervisor has assigned you the task of...Ch. 18 - Three different diodes were tested: a constant...Ch. 18 - If a hot liquid in a container is left to cool,...Ch. 18 - You are an engineer working for M M / Mars...Ch. 18 - 1. The specific gravity of gold is 19.3. Write a...Ch. 18 - An unmanned X-43A scramjet test vehicle has...Ch. 18 - A rod on the surface of Jupiter's moon Callisto...Ch. 18 - The Eco-Marathon is an annual competition...Ch. 18 - Write a function and program to determine the mass...Ch. 18 - Prob. 6RQCh. 18 - You are part of an engineering firm on contract...Ch. 18 - Prob. 8RQCh. 18 - Prob. 9RQCh. 18 - When one tries to stop a car, both the reaction...Ch. 18 - Prob. 11RQCh. 18 - Prob. 12RQCh. 18 - Prob. 13RQCh. 18 - Prob. 14RQCh. 18 - Prob. 15RQCh. 18 - Prob. 16RQCh. 18 - Prob. 17RQCh. 18 - Prob. 18RQCh. 18 - Prob. 19RQCh. 18 - Prob. 20RQCh. 18 - Prob. 21RQCh. 18 - Prob. 22RQCh. 18 - Prob. 23RQCh. 18 - Prob. 24RQCh. 18 - Prob. 25RQCh. 18 - Prob. 26RQCh. 18 - Prob. 27RQCh. 18 - Prob. 28RQCh. 18 - Download the weekly retail gasoline and diesel...Ch. 18 - A sample of the data provided in the Microsoft...Ch. 18 - An Excel file named DartTosses.xlsx has one...
Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Text book image
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Text book image
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Text book image
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Text book image
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Text book image
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Dimensional Analysis - in physics; Author: Jennifer Cash;https://www.youtube.com/watch?v=c_ZUnEUlTbM;License: Standard youtube license