Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab. will rate best answer un You are provided a .mat file (Problem2.mat) that contains data on production of various electronic devices at your company

image text in transcribedimage text in transcribedMatlab. will rate best answer

un You are provided a .mat file (Problem2.mat) that contains data on production of various electronic devices at your company during several years in the matrix Prod. Each row of the matrix contains production data for a single year. The first column of each row contains the year, eg 2007 or 2012. The remaining columns each represent the number of a specific part manufactured during that year. For example, the second column 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 columns in each row contain production numbers for the same type of device. The.mat file also contains a string array DevicelD which contains the part number for each of the electronic devices. NOTE: the first string in DevicelD is associated with second column in Prod. The number of labels must equal the number of columns in Prod minus one. There will always be only one data file but your code should work without changes if the number of rows in either data set changes. The data file will always be named as given in the problem statement. The user will enter appropriate values (vector, matrix, string) with the correct units as prompted Assume years and production increases as you move down a column. Include required documentation and header for the problem and clearty label tasks as comments in your code All output to the command window should be formatted (not unsuppressed output) Review the rubric for a description of test cases and a sample output. . vice Selection Prompt the user to select a year and a DevicelD based on the data provided. On the command window, output the year, DevicelD, and production for that year device and additional Prompt the user to enter two additional years of data for all devices (2016 & 2017). In addition, a new device was developed and implemented starting in 2016. Prompt the user to enter the device ID for the new device and the production for 2016 and 2017. Since this new device was just developed at the beginning of 2016, production will be zero for the previous years. Save both the updated DevicelD string array with the new device ID and the updated Prod matrix that includes the new device, additional years, and recent years of production data to a new file named Problem2 Task2.mat. On the command window, produce an output statement that displays the new DevicelD and the production for the new device in 2016 and 2017. evice Your company has merged with another production company and decided to replace an existing device with a new device. Prompt the user to select the device being replaced and ask for the name of the new device. Until more detailed information is available, the production values for the new device should be based on random production values. The random production values should be created by using the first value of the first device in the data set (as the low value) and the last value for the same device (as the high value). Update the information by removing the old device and adding the device and production values to the end of existing data sets from Task 2. Save both the updated DevicelD string array with the new device ID and the updated Prod matrix that includes the new device, additional years, and recent years of production data to a new file named Problem2_Task3.mat. On the command window, produce an output statement that displays the replaced device ID prior to asking for information about the new device. un You are provided a .mat file (Problem2.mat) that contains data on production of various electronic devices at your company during several years in the matrix Prod. Each row of the matrix contains production data for a single year. The first column of each row contains the year, eg 2007 or 2012. The remaining columns each represent the number of a specific part manufactured during that year. For example, the second column 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 columns in each row contain production numbers for the same type of device. The.mat file also contains a string array DevicelD which contains the part number for each of the electronic devices. NOTE: the first string in DevicelD is associated with second column in Prod. The number of labels must equal the number of columns in Prod minus one. There will always be only one data file but your code should work without changes if the number of rows in either data set changes. The data file will always be named as given in the problem statement. The user will enter appropriate values (vector, matrix, string) with the correct units as prompted Assume years and production increases as you move down a column. Include required documentation and header for the problem and clearty label tasks as comments in your code All output to the command window should be formatted (not unsuppressed output) Review the rubric for a description of test cases and a sample output. . vice Selection Prompt the user to select a year and a DevicelD based on the data provided. On the command window, output the year, DevicelD, and production for that year device and additional Prompt the user to enter two additional years of data for all devices (2016 & 2017). In addition, a new device was developed and implemented starting in 2016. Prompt the user to enter the device ID for the new device and the production for 2016 and 2017. Since this new device was just developed at the beginning of 2016, production will be zero for the previous years. Save both the updated DevicelD string array with the new device ID and the updated Prod matrix that includes the new device, additional years, and recent years of production data to a new file named Problem2 Task2.mat. On the command window, produce an output statement that displays the new DevicelD and the production for the new device in 2016 and 2017. evice Your company has merged with another production company and decided to replace an existing device with a new device. Prompt the user to select the device being replaced and ask for the name of the new device. Until more detailed information is available, the production values for the new device should be based on random production values. The random production values should be created by using the first value of the first device in the data set (as the low value) and the last value for the same device (as the high value). Update the information by removing the old device and adding the device and production values to the end of existing data sets from Task 2. Save both the updated DevicelD string array with the new device ID and the updated Prod matrix that includes the new device, additional years, and recent years of production data to a new file named Problem2_Task3.mat. On the command window, produce an output statement that displays the replaced device ID prior to asking for information about the new device

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Datalog Engines In Databases

Authors: Bas Ketsman ,Paraschos Koutris

1st Edition

1638280428, 978-1638280422

More Books

Students also viewed these Databases questions

Question

What is Working Capital ? Explain its types.

Answered: 1 week ago

Question

1. Define and explain culture and its impact on your communication

Answered: 1 week ago