Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed
image text in transcribed
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. 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

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_2

Step: 3

blur-text-image_3

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

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions