Question: Please do 1-1 a through c in MATLAB and leave comments explaining what the code means 1-1. (a) Using the md(1) function of Mathcad or


Please do 1-1 a through c in MATLAB and leave comments explaining what the code means
1-1. (a) Using the md(1) function of Mathcad or the rand(1.1) of MATLAB, generate 100 inte- ger-valued random numbers between 0 and 9. Plot a histogram in each case using 10 bins equally spaced between 0 and 10 (i... 0 to 1, 1 to 2, etc.). (Hint: For example, if using MATLAB, use the fix (-) function rather than the round() function. The latter will pro- duce a set of integers that are biased against I and 10. The student should give the reason for this. ] (b) Repeat for 1000 random numbers generated. Is the histogram more "uniform than for that of 100 random numbers? (e) Repeat for 5000 random numbers generated. Is the histogram more "uniform" than when 100 or 1000 random numbers were generated? 1-2. Simulate the widths of 5000 shims from a production line that are punched from stock nomi nally 3 mm thick but which varies uniformly from this nominal width by 20.005 mm. Plota histogram of the shim thicknesses utilizing 20 intervals. 1-3. Resistors are produced by a production line with nominal values of 1000 ohms A + 20%. Generate 1000 sample values for resistance and plot a histogram utilizing 10 intervals
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
