You are assessing the price of various components from different vendors and wish to find the least expensive vendor for each component. The prices of the parts from each vendor are stored in a matrix, VendCost. Each row corresponds to a specific vendor and each column corresponds to a specific component. If a specific part is not offered by a vendor, the corresponding entry will be –1.
Write a program that will determine which vendor offers the cheapest price for each component, and place the results in a two matrix Cheapest with the same number of columns as there are columns in VendCost. Each entry in the first row of Cheapest. Should be an integer corresponding to the row number of the vendor with the cheapest price for the correspondent, and the entries in row 2 should contain the lowest price for that component. You may assume that each part is available from at least one of the listed vendors. If two or more vendors offer a component at the same lowest price, you may choose either one.
You may not use the built-in min function or other similar functions to solve this problem. You may not use direct matrix operations to solve this problem; you must do it using for loops (in a meaningful way). Your solution must work for any number of vendors and any number of components. Example:
Want to see the full answer?
Check out a sample textbook solutionChapter 20 Solutions
Thinking Like an Engineer: An Active Learning Approach (3rd 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