Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do in matlab please You are working on a manufacturing process at a summer internship. For a specific manufacturing process, a given part is produced

Do in matlab please

You are working on a manufacturing process at a summer internship. For a specific manufacturing process, a given part is produced 25 units at a time. The machine outputs a CSV file with a measurement of how close each part in a batch was to the required specification; positive numbers indicate that the unit was X c.m. longer than the specification, while negative numbers indicate that the unit was X c.m. shorter than the required specification. If any part in a batch of 25 parts is 0.5 cm (or more) longer, or 0.5 cm (or more) shorter, than the required specification, then the entire batch of 25 parts must be rejected and the operator notified to check the manufacturing machinery. If all of the parts are acceptable, then the operator should be notified that the batch was acceptable. Read about the readmatrix() command in the MATLAB help documentation, then use it to programmatically load in the data from this data file. (There are a lot of bells-and-whistles available with readmatrix(), but the first syntax example noted in the help documentation is all that you need here.) Then, use a while loop to loop through each individual data point (one data point per iteration) to check to see if the part met the manufacturing specifications. If it did, print a statement to the screen indicating that. If it did not, print a statement to the Command Window indicating that, and terminate your part-checking process. After you are done with the checking process, print a message to the Command Window indicating the outcome from that batch of parts. Your code should be able to emulate the sample runs below, even if the provided CSV file's data only meets one of these two sample run conditions. Observe that there is space for a two digit numeric output; your code should preserve that spacing.

The given data:

image text in transcribed

-0.43 -0.26 -0.14 0.31 -0.47 -0.45 -0.32 0.15 0.23 0.14 -0.05 0.05 -0.2 0.24 -0.3 0.18 -0.31 -0.13 0.12 0.27 0.53 -0.41 0.42 0.27 -0.01

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

Step: 3

blur-text-image

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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago