I need help on doing MATLAB problem MATLAB Write a script th
I need help on doing MATLAB problem
MATLAB. Write a script that randomly chooses N integers between 1 and 6 and computes the fraction of times that the number 6 was selected. Run your script for N = 600. Print your script and report your result.Solution
A=randi(6,N,1)
Will generate random numbers between 1 and 6.
If N=600, then write
A=randi(6, 600, 1)
It will generate 600 random numbers.
If you want in rectangular array, say 60x 10, then
A=randi(6,60,10)
