Filter löschen
Filter löschen

whts the conclusion should be for this?

4 Ansichten (letzte 30 Tage)
H
H am 26 Okt. 2015
Beantwortet: Image Analyst am 26 Okt. 2015
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 Kommentar
Image Analyst
Image Analyst am 26 Okt. 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???

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 26 Okt. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by