Assume a matrix named Prod contains data on production of various electronic devices at your company during several years. Each row of the matrix contains production data for a single year. The first element in each row contains the year, e.g., 2007 or 2012. The remaining elements in each represent the number of a specific part manufactured during that year. For example, the second element might contain the number of 2N3904 transistors produced during each year, whereas the fifth column might contain the number of IC555 timer chips produced. You may assume that corresponding elements in each row contain production numbers for the same type of device.
Write a single line of code to answer each of the following questions. You may use the results of any question to answer subsequent questions if desired. A sample Prod matrix is provided online. Note that your solution must work for any properly formatted matrix Prod.
a. Create a row vector TotalProd that contains the total number of years in the first element and the total number of each item produced during all listed years in the remaining elements. Note that TotalProd will have the same number of elements as the number of columns in the Prod matrix.
b. Create a row vector AvgProd that contains the total number of years in the first element and the average number of each item produced during all listed years in the remaining elements. Note that TotalProd will have the same number of elements as the number of columns in the Prod matrix.
c. Create a two-column matrix YearProd. The first column should contain the same years as those in the first column of Prod, and the second column should contain the total number of all units produced during each year.
d. Create a two-column matrix MaxProd. Determine the maximum number of any type of device produced during each year and place the results in the second column of the corresponding row in MaxProd. The first column should contain the years.
e. Determine the maximum number of any device produced during any year and place the result in the scalar OverallMax
f. If your company makes a profit of one-fifth of one cent on each device produced, regardless of type, determine the total profit made during all listed years and place the result in Profit. Your result should be in dollars.
g. The solution to this problem is considerably more complicated than the corresponding problem using
Want to see the full answer?
Check out a sample textbook solutionChapter 16 Solutions
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
- Q1: For the following force system, find the moments with respect to axes x, y, and zarrow_forwardQ10) Body A weighs 600 lb contact with smooth surfaces at D and E. Determine the tension in the cord and the forces acting on C on member BD, also calculate the reaction at B and F. Cable 6' 3' wwwarrow_forwardHelp ارجو مساعدتي في حل هذا السؤالarrow_forward
- Q3: Find the resultant of the force system.arrow_forwardQuestion 1 A three-blade propeller of a diameter of 2 m has an activity factor AF of 200 and its ratio of static thrust coefficient to static torque coefficient is 10. The propeller's integrated lift coefficient is 0.3.arrow_forward(L=6847 mm, q = 5331 N/mm, M = 1408549 N.mm, and El = 8.6 x 1014 N. mm²) X A ΕΙ B L Y Marrow_forward
- Calculate the maximum shear stress Tmax at the selected element within the wall (Fig. Q3) if T = 26.7 KN.m, P = 23.6 MPa, t = 2.2 mm, R = 2 m. The following choices are provided in units of MPa and rounded to three decimal places. Select one: ○ 1.2681.818 O 2. 25745.455 O 3. 17163.636 O 4. 10727.273 ○ 5.5363.636arrow_forwardIf L-719.01 mm, = 7839.63 N/m³, the normal stress σ caused by self-weight at the location of the maximum normal stress in the bar can be calculated as (Please select the correct value of σ given in Pa and rounded to three decimal places.) Select one: ○ 1. 1409.193 2. 845.516 O 3. 11273.545 ○ 4.8455.159 ○ 5.4509.418 6. 2818.386 7.5636.772arrow_forwardTo calculate the rotation at Point B, a suitable virtual structure needs to be created. Which equation in the following choices most accurately represents the functional relationship between the bending moment, Mv2 ( Units: N.mm), of the virtual structure and the spatial coordinate x (Units: mm) if the applied unit virtual moment is clockwise? Select one: O 1. Mv2 1.000 O 2. Mv2=x+1.000 O 3. Mv2=x+0.000 4. Mv2 = -x-1.000 O 5. Mv2 -1.000 6. Mv2=-x+0.000arrow_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