You are an engineer working for M & M / Mars Corporation in the M&M plant. For Halloween, M&Ms are produced in “fun size.” To help with quality control, you create the following worksheet. The factory workers will examine sample bags of M&Ms and enter the weight of the bag and the individual count of M&Ms contained in the bag.
Online, you have been given the following data in a Microsoft Excel workbook called CandyCount.xlsx with the data stored on a sheet named “M and M data.” Only a portion of the actual data is shown.
Write a MATLAB program to read in the Excel data, calculate the data required as shown in the following output table, and write the results to a new Microsoft Excel file. Your output should appear as follows, where the highlighted portion is replaced by the values you calculate in your solution. Your program should also use formatted fprintf statements to display the same table in the Command Window, filling in the missing information (highlighted) and displaying the data using a reasonable number of decimal places.
The program should assume the user could enter more data to the original worksheet or modify the color names on the worksheet and the program would still run correctly.
Want to see the full answer?
Check out a sample textbook solutionChapter 17 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Q1. A curved beam of a circular cross section of diameter "d" is fixed at one end and subjected to a concentrated load P at the free end (Fig. 1). Calculate stresses at points A and C. Given: P = 800 N, d = 30 mm, a 25 mm, and b = 15 mm. Fig.1 P b B (10 Marks)arrow_forwardYou are working as an engineer in a bearing systems design company. The flow of lubricant inside a hydrodynamic bearing (p = 0.001 kg m-1 s-1) can be approximated as a parallel, steady, two-dimensional, incompressible flow between two parallel plates. The top plate, representing the moving part of the bearing, travels at a constant speed, U, while the bottom plate remains stationary (Figure Q1). The plates are separated by a distance of 2h = 1 cm and are W = 20 cm wide. Their length is L = 10 cm. By applying the above approximations to the Navier-Stokes equations and assuming that end effects can be neglected, the horizontal velocity profile can be shown to be y = +h I 2h = 1 cm x1 y = -h u(y) 1 dP 2μ dx -y² + Ay + B moving plate stationary plate U 2 I2 L = 10 cm Figure Q1: Flow in a hydrodynamic bearing. The plates extend a width, W = 20 cm, into the page.arrow_forwardQuestion 1 You are working as an engineer in a bearing systems design company. The flow of lubricant inside a hydrodynamic bearing (µ = 0.001 kg m¯¹ s¯¹) can be approximated as a parallel, steady, two-dimensional, incompressible flow between two parallel plates. The top plate, representing the moving part of the bearing, travels at a constant speed, U, while the bottom plate remains stationary (Figure Q1). The plates are separated by a distance of 2h = 1 cm and are W = 20 cm wide. Their length is L = 10 cm. By applying the above approximations to the Navier-Stokes equations and assuming that end effects can be neglected, the horizontal velocity profile can be shown to be 1 dP u(y) = 2μ dx -y² + Ay + B y= +h Ꮖ 2h=1 cm 1 x1 y = −h moving plate stationary plate 2 X2 L = 10 cm Figure Q1: Flow in a hydrodynamic bearing. The plates extend a width, W = 20 cm, into the page. (a) By considering the appropriate boundary conditions, show that the constants take the following forms: U U 1 dP A =…arrow_forward
- Question 2 You are an engineer working in the propulsion team for a supersonic civil transport aircraft driven by a turbojet engine, where you have oversight of the design for the engine intake and the exhaust nozzle, indicated in Figure Q2a. The turbojet engine can operate when provided with air flow in the Mach number range, 0.60 to 0.80. You are asked to analyse a condition where the aircraft is flying at 472 m/s at an altitude of 14,000 m. For all parts of the question, you can assume that the flow path of air through the engine has a circular cross section. (a) ← intake normal shock 472 m/s A B (b) 50 m/s H 472 m/s B engine altitude: 14,000 m exhaust nozzle E F exit to atmosphere diameter: DE = 0.30 m E F diameter: DF = 0.66 m Figure Q2: Propulsion system for a supersonic aircraft. a) When the aircraft is at an altitude of 14,000 m, use the International Standard Atmosphere in the Module Data Book to state the local air pressure and tempera- ture. Thus show that the aircraft speed…arrow_forwardيكا - put 96** I need a detailed drawing with explanation or in wake, and the top edge of im below the free surface of the water. Determine the hydrothed if hydrostatic on the Plot the displacement diagram for a cam with roller follower of diameter 10 mm. The required motion is as follows; 1- Rising 60 mm in 135° with uniform acceleration and retardation motion. 2- Dwell 90° 3- Falling 60 mm for 135° with Uniform acceleration-retardation motion. Then design the cam profile to give the above displacement diagram if the minimum circle diameter of the cam is 50 mm. =--20125 7357 750 X 2.01arrow_forwardYou are working as an engineer in a bearing systems design company. The flow of lubricant inside a hydrodynamic bearing (µ = 0.001 kg m¯¹ s¯¹) can be approximated as a parallel, steady, two-dimensional, incompressible flow between two parallel plates. The top plate, representing the moving part of the bearing, travels at a constant speed, U, while the bottom plate remains stationary (Figure Q1). The plates are separated by a distance of 2h = 1 cm and are W = 20 cm wide. Their length is L = 10 cm. By applying the above approximations to the Navier-Stokes equations and assuming that end effects can be neglected, the horizontal velocity profile can be shown to be U y = +h У 2h = 1 cm 1 x1 y=-h u(y) = 1 dP 2μ dx -y² + Ay + B moving plate - U stationary plate 2 I2 L = 10 cm Figure Q1: Flow in a hydrodynamic bearing. The plates extend a width, W = 20 cm, into the page. (a) By considering the appropriate boundary conditions, show that the constants take the following forms: A = U 2h U 1 dP…arrow_forward
- Question 2 You are an engineer working in the propulsion team for a supersonic civil transport aircraft driven by a turbojet engine, where you have oversight of the design for the engine intake and the exhaust nozzle, indicated in Figure Q2a. The turbojet engine can operate when provided with air flow in the Mach number range, 0.60 to 0.80. You are asked to analyse a condition where the aircraft is flying at 472 m/s at an altitude of 14,000 m. For all parts of the question, you can assume that the flow path of air through the engine has a circular cross section. (a) normal shock 472 m/s A B (b) intake engine altitude: 14,000 m D exhaust nozzle→ exit to atmosphere 472 m/s 50 m/s B diameter: DE = 0.30 m EX diameter: DF = 0.66 m Figure Q2: Propulsion system for a supersonic aircraft. F a) When the aircraft is at an altitude of 14,000 m, use the International Standard Atmosphere in the Module Data Book to state the local air pressure and tempera- ture. Thus show that the aircraft speed of…arrow_forwardgiven below: A rectangular wing with wing twist yields the spanwise circulation distribution kbV1 roy) = kbv. (2) where k is a constant, b is the span length and V. is the free-stream velocity. The wing has an aspect ratio of 4. For all wing sections, the lift curve slope (ag) is 2 and the zero-lift angle of attack (a=0) is 0. a. Derive expressions for the downwash (w) and induced angle of attack a distributions along the span. b. Derive an expression for the induced drag coefficient. c. Calculate the span efficiency factor. d. Calculate the value of k if the wing has a washout and the difference between the geometric angles of attack of the root (y = 0) and the tip (y = tb/2) is: a(y = 0) a(y = ±b/2) = /18 Hint: Use the coordinate transformation y = cos (0)arrow_forward۳/۱ العنوان O не شكا +91x PU + 96852 A heavy car plunges into a lake during an accident and lands at the bottom of the lake on its wheels as shown in figure. The door is 1.2 m high and I m wide, and the top edge of Deine the hadrostatic force on the Plot the displacement diagram for a cam with roller follower of diameter 10 mm. The required motion is as follows; 1- Rising 60 mm in 135° with uniform acceleration and retardation motion. 2- Dwell 90° 3- Falling 60 mm for 135° with Uniform acceleration-retardation motion. Then design the cam profile to give the above displacement diagram if the minimum circle diameter of the cam is 50 mm. = -20125 750 x2.01arrow_forward
- Plot the displacement diagram for a cam with roller follower of diameter 10 mm. The required motion is as follows; 1- Rising 60 mm in 135° with uniform acceleration and retardation motion. 2- Dwell 90° 3- Falling 60 mm for 135° with Uniform acceleration-retardation motion. Then design the cam profile to give the above displacement diagram if the minimum circle diameter of the cam is 50 mm.arrow_forwardQ1/ A vertical, circular gate with water on one side as shown. Determine the total resultant force acting on the gate and the location of the center of pressure, use water specific weight 9.81 kN/m³ 1 m 4 marrow_forwardI need handwritten solution with sketches for eacharrow_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