A machine cuts N pieces of a pipe. After each cut, each piece ofthe pipe is weighed and its length is measured. These two valuesare stored in a matrix called pipe where the first column is thelength and the second column is the weight. Each row represents theweight and length of a cut piece of pipe. Ignoring units, theweight is supposed to be between 2.1 and 2.3, inclusive. The lengthis supposed to be between 10.3 and 10.4, inclusive.
Create a flow chart to do the following, using MATLAB syntax in allblocks: ï‚· Count how many rejects there are. A reject is any piecethat has an invalid weight and/or length. ï‚· Return the number ofrejects ï‚· Return the percentage of the total number of parts thatare rejects