
Concept explainers
Download the weekly retail gasoline and diesel prices Excel workbook Gasoline.xlsx associated with this review question and place it in your main MATLAB Current Directory. This data set is based on the data set available from the U.S. Energy Information Administration: http://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_nus_w.htm. WARNING: Your system MAY import the first column (dates) as numeric date codes instead of ignoring them as text, so watch out.
a. Calculate the average, minimum, and maximum retail fuel prices for each of the different types of fuel (regular, midgrade, premium, diesel) over the duration of the entire sample set. Your output should work in such a way that if the original Excel file were modified to include more weeks (rows), you would not need to change your MATLAB code. Your output should appear similar to the following format, where the blanks are replaced by the actual calculated values:
Your code should calculate the values shown in the output—you should not hard-code the values in the output. Each value you display should appear with two decimal values. You may use any built-in MATLAB function, including functions that find the minimum, maximum, or average values.
b. We have decided that we want to modify our previous analysis in part (a) to export the computed max, min, and average values to a new Microsoft Excel workbook. The data itself should be exported to a sheet named Fuel Price Analysis. Your data should appear similar to the worksheet that follows. Much like part (a), your code should be written in such a way that if the original Excel file were modified to include more weeks (rows), you would not need to change your MATLAB code.

Want to see the full answer?
Check out a sample textbook solution
Chapter 17 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Mechanical engineering question.arrow_forwardA shaft is loaded in bending and torsion such that Ma = 70 N·m, T₁ = 45 N · m, M = 55 N. m, and T = 35 N m. For the shaft, S₁ = 700 MPa and S = 560 MPa, and a fully corrected endurance limit of S₂ = 210 MPa is assumed. Let K = 2.2 and K = 1.8. With a Se design factor of 2.0 determine the minimum acceptable diameter of the shaft using the a) DE- Goodman b) DE-Morrow c) DE-Gerber d) DE-SWTarrow_forwardThe feed flow rate to an adiabatic continuous stirred tank reactor (CSTR) in which an exothermicreaction is occurring is increased from 1000 to 1400. kg/h, causing the outlet temperature to change as shown:a) Briefly explain on a physical basis why the temperature in this system oscillates after a step increasein the inlet flow rate. Be clear, complete, and concise. c) You know that this oscillating response cannot be that of two first order processes with real timeconstant acting in series. Assuming the reaction is first order and the CSTR operates with constant holdup,derive the block diagram with all transfer functions indicating how the temperature would respond to the feedflow rate step change (W’(s) as input and T’(s) as output). An intermediate variable in this block diagram willbe the concentration of A in the reactor, represented by CA’(s). d) A correct result for part c) will include a feedback loop in the block diagram, indicating the responsein T to a change in w is not…arrow_forward
- Spur gears Note : Exam is open notes &tables / Answer all questions. Q.1. The press shown for Figure.1 has a rated load of 22 kN. The twin screws have double start Acme threads, a diameter of 50 mm, and a pitch of 6 mm. Coefficients of friction are 0.05 for the threads and 0.08 for the collar bearings. Collar diameters are 90 mm. The gears have an efficiency of 95 percent and a speed ratio of 60:1. A slip clutch, on the motor shaft, prevents overloading. The full-load motor speed is 1720 rev/min. (a) When the motor is turned on, how fast will the press head move? (Vm= , Vser. = ) (5M) (b) What should be the horsepower rating of the motor? (TR=, Tc= Pser. = " Bronze bushings Foot Motor Bearings watt, Pm= watt, Pm= h.p.) (20M) 2['s Fig.1 Worm Collar bearingarrow_forwardProblem 2 (55 pts). We now consider the FEM solution of Problem 1.(a) [5pts] Briefly describe the 4 steps necessary to obtain the approximate solution of thatBVP using the Galerkin FEM. Use the minimum amount of math necessary to supportyour explanations.(b) [20pts] Derive the weak form of the BVP.(c) [10pts] Assuming a mesh of two equal elements and linear shape functions, sketch byhand how you expect the FEM solution to look like. Also sketch the analytical solutionfor comparison. In your sketch, identify the nodal degrees of freedom that the FEMsolution seeks to find.(d) [10pts] By analogy with the elastic rod problem and heat conduction problem considered in class, write down the stiffness matrix and force vector for each of the twoelements considered in (c).(e) [10pts] Assemble the global system of equations, and verbally explain how to solve it.arrow_forwardAn aluminum rod of length L = 1m has mass density ρ = 2700 kgm3 andYoung’s modulus E = 70GPa. The rod is fixed at both ends. The exactnatural eigenfrequencies of the rod are ωexactn =πnLqEρfor n=1,2,3,. . . .1. What is the minimum number of linear elements necessary todetermine the fundamental frequency ω1 of the system? Discretizethe rod in that many elements of equal length, assemble the globalsystem of equations KU = ω2MU, and find the fundamentalfrequency ω1. Compute the relative error e1 = (ω1 − ωexact1)/ωexact1.Sketch the fundamental mode of vibration.arrow_forward
- Problem 1 (65 pts, suggested time 50 mins). An elastic string of constant line tension1T is pinned at x = 0 and x = L. A constant distributed vertical force per unit length p(with units N/m) is applied to the string. Under this force, the string deflects by an amountv(x) from its undeformed (horizontal) state, as shown in the figure below.The PDE describing mechanical equilibrium for the string isddx Tdvdx− p = 0 . (1)(a) [5pts] Identify the BCs for the string and identify their type (essential/natural). Writedown the strong-form BVP for the string, including PDE and BCs.(b) [10pts] Find the analytical solution of the BVP in (a). Compute the exact deflectionof the midpoint v(L/2).(c) [15pts] Derive the weak-form BVP.(d) [5pts] What is the minimum number of linear elements necessary to compute the deflection of the midpoint?(e) [15pts] Write down the element stiffness matrix and the element force vector for eachelement.arrow_forwardProblem 1 (35 pts). An elastic string of constant line tension1 T is pinned at x = 0 andx = L. A constant distributed vertical force per unit length p (with units N/m) is appliedto the string. Under this force, the string deflects by an amount v(x) from its undeformed(horizontal) state, as shown in the figure below.Force equilibrium in the string requires thatdfdx − p = 0 , (1)where f(x) is the internal vertical force in the string, which is given byf = Tdvdx . (2)(a) [10pts] Write down the BVP (strong form) that the string deflection v(x) must satisfy.(b) [2pts] What order is the governing PDE in the BVP of (a)?(c) [3pts] Identify the type (essential/natural) of each boundary condition in (a).(d) [20pts] Find the analytical solution of the BVP in (a).arrow_forwardProblem 2 (25 pts, (suggested time 15 mins). An elastic string of line tension T andmass per unit length µ is pinned at x = 0 and x = L. The string is free to vibrate, and itsfirst vibration mode is shown below.In order to find the frequency of the first mode (or fundamental frequency), the string isdiscretized into a certain number of linear elements. The stiffness and mass matrices of thei-th element are, respectivelyESMi =TLi1 −1−1 1 EMMi =Liµ62 11 2 . (2)(a) [5pts] What is the minimum number of linear elements necessary to compute the fundamental frequency of the vibrating string?(b) [20pts] Assemble the global eigenvalue problem and find the fundamental frequency ofvibration of the stringarrow_forward
- I need part all parts please in detail (including f)arrow_forwardProblem 3 (10 pts, suggested time 5 mins). In class we considered the mutiphysics problem of thermal stresses in a rod. When using linear shape functions, we found that the stress in the rod is affected by unphysical oscillations like in the following plot E*(ux-a*T) 35000 30000 25000 20000 15000 10000 5000 -5000 -10000 0 Line Graph: E*(ux-a*T) MULT 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Arc length (a) [10pts] What is the origin of this issue and how can we fix it?arrow_forwardanswer the questions and explain all of it in words. Ignore where it says screencast and in class explanationarrow_forward
- 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





