Here is the question:
Write a script that does the following. Use fprintf and do not show scientific notaiton. NOTE: You will be able to reuse this code in Project 2. Publish your results from MATLAB in a Word document and upload here.
- Generate an array y with 100 elements that is normally distributed with a mean of 2.5 and a standard deviation of 1 using the expression 2.5+1*randn(1). Notice you will get fractional results.
- Determine the average y-value (use fprintf and avoid scientific notation). Use a for loop (do not simply use the command mean().)
- Determine the number of y-values less than the number 2.0
PLEASE DO NOT GIVE ME THE COMPLETE ANSWER TO THIS WHOLE PROBLEM. I just want to know if I should split this question into three different sections using "%%" or if I should just lump the whole thing together. Also, I am trying to use fprintf and am having very little success. Do I put fprintf in three separate sections or just at the end of the whole problem? Thanks!
Best Answer