Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***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

image text in transcribed

***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

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

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

Additional Factors Affecting Group Communication?

Answered: 1 week ago