Question: Task 3 a . Read through following subtasks and create a flow chart of how the algorithm should look. b . Create an array named
Task
a Read through following subtasks and create a flow chart of how the algorithm should look.
b Create an array named quality made up of elements between and using the command
randi
The items through classify the quality of unspecified components:
Defective
Rework Needed
Pass
High Quality
c Count the total number of items in the quality array by using the length function and store the
value in a variable named numitems
d Create a variable named reworkcount and initialize it to This will be used to count how many
items need rework.
e Use a for loop to iterate through each element of the quality array to check how many items need
rework. If so increase the reworkcount by
f Calculate the percentage of items that need rework and store this value in a variable named
reworkpercentage.
g Use the disp function to output the total number of items needing rework using numstr
h Type the variable name quality in the command window and count the amount of s in the array
to confirm your code worked.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
