Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Workshop 2 1 solution submitted ( max: 5 ) | View my solutions nvalid Pipes ( Vectorized ) A machine cuts N pieces of a

Workshop 2
1 solution submitted (max: 5)| View my solutions
nvalid Pipes (Vectorized)
A machine cuts N pieces of a pipe. After each cut, each piece of pipe is weighed (grams) and its length (meters) is measured. These 2 values are then stored in a file called ME2004_PipeData.mat (see Canvas). NOTE: In MATLAB Grader, this data file is provided - but you still need to load() it!
Invalid Pipes (Loops)
Gravity
The weight is supposed to be between has an invalid weight and/or length.
Develop a MATLAB script which returns:
num_invalid, the total number of invalid pipes
invalid_pipes, a row vector storing the indices of invalid pipes
For example, consider the following data:
weight =[692730551];
lngth =[1.231.171.38];
Pipe 1 is invalid because its weight is too low (despite its length being acceptable).
Pipe 2 is valid.
Pipe 3 is invalid because both its weight and height violate the boundaries
Thus:
num_invalid =2;
invalid_pipes =[13];
For this problem, you must vectorize! No decision/repetition structures! bar() and yline() functions may be useful visualization tools.
image text in transcribed

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

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions

Question

=+1. What feelings or emotions are coming up for you right now?

Answered: 1 week ago