Question

MATLAB. Save the following MATLAB script in an M-file to simulate chips from suppliers S1 and...

MATLAB. Save the following MATLAB script in an M-file to simulate chips from
suppliers S1 and S2. Do not worry about how the script works. Run it, and based
on your output, tell which supplier you think has more reliable chips.
% Chips from suppliers S1 and S2.
%
NOS1 = 983; % Number of chips from S1
NOS2 = 871; % Number of chips from S2
NOWS1 = sum(rand(1,NOS1) >= 0.2); NODS1 = NOS1-NOWS1;
NOWS2 = sum(rand(1,NOS2) >= 0.3); NODS2 = NOS2-NOWS2;
Nmat = [ NOWS1 NOWS2; NODS1 NODS2 ]
NOS = [ NOS1 NOS2 ]
fprintf('Rel freq working chips from S1 is %4.2f.\n',...
NOWS1/NOS1)
fprintf('Rel freq working chips from S2 is %4.2f.\n',...

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The MATLAB output is:

Command Window >> NOS1 = 983; * Number of chips from Si NOS2 = 871; $ Number of chips from S2 sum (rand (1, NOS1) >= 0.2); NO

The relative frequency working chips from S1 is 0.79.

The relative frequency working chips from S2 is 0.69.

Since the relative frequency working chips from S1 is more, we can say that the Supplier 1 has more reliable chips.

Please give me a thumbs-up if this helps you out. Thank you!

Add a comment
Know the answer?
Add Answer to:
MATLAB. Save the following MATLAB script in an M-file to simulate chips from suppliers S1 and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT