Assume four row vectors named prod10 prod11 prod12 and


Assume four row vectors named Prod10, Prod11, Prod12, and Prod13 contain data on production of various electronic devices at your company during the four years 2010, 2011, 2012, and 2013, respectively. The corresponding elements in each represent the number of a specific part manufactured during that year. For example, the first 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 all four vectors contain the same number of elements, corresponding to the same produced items.

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. Note that your solutions should work regardless of the number of elements in the four vectors.

(a) Create a new vector TotalProd that contains the total number of each item produced during the four-year period. Note that TotalProd will have the same number of ele- ments as the original four vectors.

(b) Create a new vector AvgProd that contains the average number produced per year of each item during the four-year period. Note that AvgProd will have the same number of elements as the original four vectors.

(c) Create a four element column vector YearProd that contains the total number of all units produced during each year. 2010 production should be in the first (top) element.

(d) Determine the maximum number of any type of device produced during each year and place the results in a four element column vector MaxProd.

(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 this four year period and place the result in Profit. Your result should be in dollars.

Request for Solution File

Ask an Expert for Answer!!
Operation Management: Assume four row vectors named prod10 prod11 prod12 and
Reference No:- TGS01609353

Expected delivery within 24 Hours