Question
You are studying the number of defective parts produced each week by several machines to help adjust maintenance protocols. Assume the rows of matrix Def
You are studying the number of defective parts produced each week by several machines to help adjust maintenance protocols. Assume the rows of matrix Def represent different machines and all columns except the last represent weeks . The last column contains the long-term average of the number of defects per week produced by that machine. Write a short section of MATLAB code that will generate a new matrix Comp with the same number of rows but one fewer columns as described. The code will compare each value in the matrix, except those in the last column, to the value in the last column of the same row to compare the number of defective parts produced by each machine each week with that machine's long-term defect rate.
If the number of errors equals that machine's average, the corresponding element in the new matrix Comp will equal 0.
If the number of errors is greater than that machine's average, the corresponding element in the new matrix Comp will equal 1.
If the number of errors is less than that machine's average, the corresponding element in the new matrix Comp will equal -1.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started