Question: ***THE NUMBERS PROVIDED (2.14 2.32, 2.20,.. etc) ARE NOT VALUES GIVEN FOR THE MATRIX. PLEASE DO NOT USE THOSE NUMBERS USER SHOULD IMPUT HOW MANY

 ***THE NUMBERS PROVIDED (2.14 2.32, 2.20,.. etc) ARE NOT VALUES GIVEN

***THE NUMBERS PROVIDED (2.14 2.32, 2.20,.. etc) ARE NOT VALUES GIVEN FOR THE MATRIX. PLEASE DO NOT USE THOSE NUMBERS

USER SHOULD IMPUT HOW MANY PIPE CUT (N) AND THE SCRIPT SHOULD GENERATE AND DISPLAY A RANDOM MATRIX AND DISPLAY TOTAL REJECTS IN MATLAB.

(25) A machine cuts N pieces of a pipe. After each cut, each piece of pipe is weighed and its length is measured; these two values are then stored in a matrix with two columns (first the weight and then the length on each row of the matrix). Ignoring units, the weight is supposed to be between 2.1 and 2.3, inclusive, and the length is supposed to be between 10.3 and 10.4, inclusive. Write a script that counts how many rejects there are. A reject is any pipe that has an invalid weight and/or length. For a simple example, if N is 3, the matrix could look like: 2.14 10.30 2.32 10.36 2.20 10.45 there is two rejects, the second (weight) and third ones (length). The script would print: There were 2 rejects in total. D re were (1) There were 1 rejects due to weight. There were 1 rejects due to length. D (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!