Clear Filters
Clear Filters

whts the conclusion should be for this?

4 views (last 30 days)
please help me with this questions. I have done it but i dont know whts the conclusion should be. i will appreciate if someone can give me a conclusion. The question is below
The command A=randi([1 6]),n,5), where n > 0 is a positive integer, produces a matrix A having n rows and 5 columns consisting of random integers between 1 and 6. Produce a script that asks for a positive integer n > 0 and that then:
Creates the vector v such that v(k) is the sum of the k-th row of A. Then a plot is created in a figure window using the following commands:
histogram(v,'normalization','probability') (please explain wht this command does?)
hold on
ezplot('(1/(3.8188*sqrt(2*pi)))*exp(-(x-17.5)ˆ2/(2*(3.8188ˆ2)))',[5 30]) (please explain wht this command does?
By making n large (about 5000) draw a conclusion from the obtained figure (note that each row of A can be interpreted as the outcome of throwing 5 dice).
  1 Comment
Image Analyst
Image Analyst on 26 Oct 2015
You say you've done it, but you forgot to post your figure. Please post a screenshot so that we might be able to draw a conclusion from it. Off the top of my head, I'm not sure what plotting that Gaussian depending on "x" has to do with your "v" vector. What relationship is there between x and v???

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 26 Oct 2015
Line 6 of your code is wrong - it should be
B = A(:, 2:2:end);
Line 7 is not how most MATLAB programmers would do it. It should be
v = sum(A, 2);
For your conclusion, see the Central Limit Theorem.

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!