whts the conclusion should be for this?
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
Image Analyst
2015-10-26
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???
采纳的回答
Image Analyst
2015-10-26
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);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!