Question: Please complete the Matlab script and indicate how many pipes are rejectef. thank you! Complete the script A machine cuts N pieces of a pipe.

"Complete the script A machine cuts N pieces of a pipe. After each cut each piece of pipe is weighed and its length is measured, these 2 values are then stored in a matrix, pipe (weight is stored in the first column and length is stored in the second column). Ignoring units, the weight is supposed to be between 2 1 and 23, inclusive and the length is supposed to be between 10 3 and 10.4 inclusive The script should count how many rejects there are Ateject is any piece of pipe that has an invalid weight andior longth Complete the script below (specially highlighted lines), "You may copy the broken script below then paste to MATLAB script file to finish. **At least, make sure that your script doesn't show any syntax error 96 read the pipe data and separate into vectors pipe-22654 2 3896,2 2670 20650 2 2844,2 2347 200602 1686 2 1811,2 2071 103245,10 2114,10.3063,10 3408, 10.4062,10 3616,103757.10.3093 10.4802,103335. separate pipe to 2 vectors, weight and longht woight length N-length(weight), % count for the error pipo count. %counting variable for is it weights (0 21 ll complete the condition %count how many times do the if conditions become true Madd an action (use counter vanable) end end fprintf(There were %d rojects. W', count) QUESTION 2 Based on the completed script, how many pipes are rejected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
