Thinking Like An Engineer: An Active Learning Approach, Student Value Edition (4th Edition)
4th Edition
ISBN: 9780134640150
Author: STEPHAN, Elizabeth A.; Bowman, David R.; Park, William J.; Sill, Benjamin L.; Ohland, Matthew W.
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 18, Problem 17RQ
To determine
Develop the MATLAB function named “HeatWarning”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Hi I need help to make the line change into a different color, I half of the line to be orange and I need the other half of the line towards the end to be purple as shown in the picture. Also I need there be a box saying Diesel, petrol, diesel best fit, petrol best fit. This part is also shown in the graph.
Please use this code and fix it in MATLAB:
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Fix the random seed for reproducibility
rng(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);
% Combine the best fit lines
combinedFit =…
Could you please fix my code it’s supposed to look like the graph that’s on the picture. But the lines do not cross eachother at the beginning. Could you make the lines look like the lines on the graph?
Use this code in MATLAB and fix it.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Define your seed here
seed = 50;
rand('seed',seed); % Set the seed for reproducibility
% Assumed CO2 emissions for Diesel and Petrol
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 with a reduced degree of 2
pDiesel = polyfit(carPosition, CO2Diesel, 2);
pPetrol = polyfit(carPosition, CO2Petrol, 2);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol = polyval(pPetrol, carPosition);
% Plotting the data
figure;
hold on;
% Plot Diesel best fit line…
Engr 215 Matlab
Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value temperatureFahrenheit, write a statement that assigns temperatureCelsius with the equivalent Celsius value.
While the equation is C = 5/9 * (F - 32), as an exercise use two statements, the first of which is "fractionalMultiplier = 5/9;"]
Chapter 18 Solutions
Thinking Like An Engineer: An Active Learning Approach, Student Value Edition (4th Edition)
Ch. 18.1 - Create a written algorithm that determines the...Ch. 18.1 - Prob. 2CCCh. 18.1 - Create a flowchart that determines the dose of a...Ch. 18.1 - Create a flowchart that determines the state of...Ch. 18.2 - Prob. 5CCCh. 18.2 - Prob. 6CCCh. 18.3 - Assume the following variables have been defined:...Ch. 18.3 - Prob. 8CCCh. 18.3 - Write a short section of MATLAB code that will...Ch. 18.3 - Prob. 10CC
Ch. 18.3 - Prob. 11CCCh. 18.3 - Assume a user has responded to the question "Do...Ch. 18.3 - Assume a user has responded to the question "Do...Ch. 18.4 - Write MATLAB code to represent the following...Ch. 18.4 - Write MATLAB code to represent the following...Ch. 18.4 - Write a MATLAB function named sumTtUp that will...Ch. 18.4 - Prob. 17CCCh. 18.5 - A device constructed to throw various objects can...Ch. 18.6 - Prob. 19CCCh. 18.6 - Prob. 20CCCh. 18.7 - Write MATLAB code to modify the previous gravity...Ch. 18.7 - Write MAT LAB code using try-catch to ask the user...Ch. 18 - Create a written algorithm and flowchart to...Ch. 18 - The Occupational Safety Health Administration...Ch. 18 - Prob. 3ICACh. 18 - Create a flowchart that represents the following...Ch. 18 - Create an algorithm to classify a given altitude...Ch. 18 - Answer the following questions. a. For what...Ch. 18 - Answer the following questions. a. For what...Ch. 18 - For each task listed, write a single MAT LAB...Ch. 18 - Prob. 9ICACh. 18 - What is stored in variable A after each of the...Ch. 18 - What will be displayed by the following code in...Ch. 18 - Ask users to enter a matrix that could be any size...Ch. 18 - A menu is generated using the following code:...Ch. 18 - A menu is generated using the following code:...Ch. 18 - Write a program using if-elseif-else statements...Ch. 18 - Write a program using switch-case statements that...Ch. 18 - Prob. 17ICACh. 18 - Write a program that asks the user to enter the...Ch. 18 - Prob. 19ICACh. 18 - Assume you are required to generate the menus...Ch. 18 - Assume you are required to generate the menus...Ch. 18 - Prob. 22ICACh. 18 - Assume you are required to generate the menus...Ch. 18 - We go to a state-of-the-art amusement park. All...Ch. 18 - A phase diagram for carbon and platinum is shown....Ch. 18 - Prob. 27ICACh. 18 - Prob. 28ICACh. 18 - Prob. 29ICACh. 18 - The Apple TV is a personal video device created by...Ch. 18 - Prob. 2RQCh. 18 - Prob. 3RQCh. 18 - Create an algorithm to determine whether a given...Ch. 18 - 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 - Assume a variable R contains a single number....Ch. 18 - Prob. 10RQCh. 18 - Create a program to determine whether a...Ch. 18 - Create a program to determine whether a given Mach...Ch. 18 - Humans can see electromagnetic radiation when the...Ch. 18 - For the protection of both the operator of a...Ch. 18 - Prob. 15RQCh. 18 - Prob. 17RQCh. 18 - Your function should use polyfit to determine the...Ch. 18 - Prob. 19RQCh. 18 - Prob. 20RQCh. 18 - The variable grade can have any real number value...Ch. 18 - Write a MATLAB program that will allow the student...Ch. 18 - One of the 14 NAE Grand Challenges is Engineering...Ch. 18 - Prob. 25RQ
Knowledge Booster
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
- .arrow_forwardHello 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…arrow_forwardPlease make the exact graph that you see in the picture, along with the graph are numbers that are data. Please make the exact graph do not make anything thing different, the blue and orange circles should be there and the lines should be the same including the titles. Please make sure everything is exactly the same. Use MATLAB, and send the code and please make sure no error signs comes up. Take your time please I need help.arrow_forward
- There is a small space between the orange and purple line could you please connect the two lines together also can you please make the purple line shorter and then connect the purple line to the orange line, please take out the box that says “Diesel, petrol, Diesel best fit, petrol best fit”. Also when ever I run this code the graph shows up but there are still errors that comes up could you please fix them when you are running this on MATLAB. Please use this code on MATLAB and fix it. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Fix the random seed for reproducibility rng(50); % Assumed CO2 emissions for Diesel and Petrol 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…arrow_forwardI need help with the purple line the line that you see one the graph on the picture needs to be on the graph. Use this code to add the purple line and make sure it’s crossing the orange line. Please make sure the lines are positioned the same way it is shown on the picture with the graph. Use this code on MATLAB and add the purple line. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Use the 'seed' function instead of 'rng' seed = 50; % Define your seed here rand('seed',seed); % Assumed CO2 emissions for Diesel and Petrol 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 with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition);…arrow_forwardKeep the same colors the same graph, basically keep everything the same just make the line with a small curve just as shown on the picture Keep everything the same just make the line less curvy please do not change the colors of the line and the circles do not change anything besides the curve of the line. Use this code on MATLAB and fix it. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Use the 'seed' function instead of 'rng' seed = 50; % Define your seed here rand('seed',seed); % Assumed CO2 emissions for Diesel and Petrol 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 with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition);…arrow_forward
- You are a biomedical engineer working for a small orthopaedic firm that fabricates rectangular shaped fracture fixation plates from titanium alloy (model = "Ti Fix-It") materials. A recent clinical report documents some problems with the plates implanted into fractured limbs. Specifically, some plates have become permanently bent while patients are in rehab and doing partial weight bearing activities. Your boss asks you to review the technical report that was generated by the previous test engineer (whose job you now have!) and used to verify the design. The brief report states the following... "Ti Fix-It plates were manufactured from Ti-6Al-4V (grade 5) and machined into solid 150 mm long beams with a 4 mm thick and 15 mm wide cross section. Each Ti Fix-It plate was loaded in equilibrium in a 4-point bending test (set-up configuration is provided in drawing below), with an applied load of 1000N. The maximum stress in this set-up was less than the yield stress for the Ti-6Al-4V…arrow_forwardMy 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.arrow_forwardSolve it correctly please. Multiple votes will be given.arrow_forward
- I’m making the graph that you see in the picture but the code that I’m using makes the line with to many curves. Could you make the lines look like the one that you see on the graph. Don’t change the color just make it with a little bit less curves like you see in the picture. Use this code on MATLAB and fix it. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Fix the random seed for reproducibility rng(50); % Assumed CO2 emissions for Diesel and Petrol 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); % Combined best fit combinedFit = (fitDiesel + fitPetrol) / 2;…arrow_forwardFor the air compressor shown in Figure below, the air enters from a large area and exit from small one, explain why? Instructions for answering this question: The answer to this questian is required as handwritten where you are aiso required to add a Handwritten integrity Statement. Pieose follow the below steps: 1 Write on a blank poper your AUM student ID, full name, course code, section and date 2 Write the following integrity statement and sign: "7 offirm that I have neither given nor received any help on this assessment and that personally compieted it on my own." 3. Write your onswer to the obove question as required 4. Put your Original Civil ID card or AUM ID card on the poper 5 Toke o picture or scan, and uplood Important note: if handwritten document is submitted without the integrity stotement including ID (Civil ID or AUM ID), then the related handwritten question(s) will not be groded.arrow_forwardUse MATLAB, please make sure you use the numbers on the picture to make the graph that is also on the pictures. Make an exact copy of that graph and make sure that it runs on MATLAB, please send the code and a screenshot of the graph to show that it works. I need help with this.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Heat Transfer – Conduction, Convection and Radiation; Author: NG Science;https://www.youtube.com/watch?v=Me60Ti0E_rY;License: Standard youtube license