
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 solution
Chapter 20 Solutions
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
- need help?arrow_forwardA bent pipe is attached to a wall with brackets as shown. A force of F = 180 lb is applied to the end of the tube with direction indicated by the dimensions in the figure. Determine the support reactions at the brackets B, C, and D. Model these brackets as journal bearings (only force reactions perpendicular to the axis of the tube) and neglect couple moment reactions. Assume the distance between the supports at B and C and the tube bends nearby are negligible such that the support at C is directly above the support at D and the dimension g gives the distance between supports B and C. Enter your answers in Cartesian components. 2013 Michael Swanbom cc 10 BY NC SA g h א B 8° У A C x каж Values for dimensions on the figure are given in the table below. Note the figure may not be to scale. Variable Value a 6.72 in b 11.8 in с 14.8 in d 42.0 in h 26.6 in g 28.0 in → The reaction at B is B = lb. The reaction at C is C = lb. The reaction at D is D = lb. + << + + 2. + + 557 〈んarrow_forwardThe force F1 = 10 kN, F2 = 10 kN, F3 = 10 kN, F4 = 5 KN are acting on the sttructure shown. Determine the forces in the members specified below. Use positive values to indicate tension and negative values to indicate compression. F2 D b F1 F3 C E b F4 b B F a G Values for dimensions on the figure are given in the following table. Note the figure may not be to scale. Variable Value a 3 m b 4 m The force in member BC is KN. The force in member BE is KN. The force in member EF is KN.arrow_forward
- h = The transmission tower is subjected to the forces F₁ 3.6 KN at 50° and F2 = 3.3 kN at = 35°. Determine the forces in members BC, BP, PQ, PC, CD, DP and NP. Use positive values to indicate tension and negative values to indicate compression. 不 кажаж в *а*аж E N M d d IF, c B CENTER LINE S อ K F₂ Kbb cc 10 BY NC SA 2013 Michael Swanbom Values for dimensions on the figure are given in the following table. Note the figure may not be to scale. Variable Value a 1.7 m b 4.9 m с 3 m d 5.2 m h 8.4 m Values for dimensions on the figure are given in the following table. Note the figure may not be to scale. Variable Value a 1.7 m 4.9 m с 3 m d 5.2 m h 8.4 m The force in member BC is KN. The force in member BP is KN. The force in member PQ is KN. The force in member PC is KN. The force in member CD is KN. The force in member DP is KN. The force in member NP is KN.arrow_forwardنصاف Sheet Asteel bar of rectangular cross section with dimension Shown in fig. below. This bar is as Connected toawell. Using welded Join a long the sides als only find the weld size (h). Where: Tall = 35 MN/M² F=213.30 answer/h= 4.04 ☐ Yomm Soomm 100mmarrow_forwardFEAarrow_forward
- FEAarrow_forwardHELP?arrow_forwardTrue and False Indicate if each statement is true or false. T/F 1. Rule #1 protects the function of assembly. T/F 2. One of the fundamental dimensioning rules requires all dimensions apply in the free-state condition for rigid parts. T/F 3. The fundamental dimensioning rules that apply on a drawing must be listed in the general notes. T/F 4. Where Rule #1 applies to a drawing, it limits the form of every feature of size on the drawing. T/F 5. Rule #1 limits the variation between features of size on a part. T/F 6. The designer must specify on the drawing which features of size use Rule #1. T/F T/F T/F 7. Rule #1 applies to nonrigid parts (in the unrestrained state). 8. A GO gage is a fixed-limit gage. 9. Rule #1 requires that the form of an individual regular feature of size is controlled by its limits of sizearrow_forward
- Principles of Heat Transfer (Activate Learning wi...Mechanical EngineeringISBN:9781305387102Author:Kreith, Frank; Manglik, Raj M.Publisher:Cengage Learning
