How can I make a normal distribution with n*n matrix?
3 次查看(过去 30 天)
显示 更早的评论
Matrix A is 1000*1000 in size. I want to make normal PDF of each row( for example A(1,1:1000) and then A(2,1:1000) and...), by normpdf(A,mean(A),std(A)) function.
can you please advise?
thank you
0 个评论
采纳的回答
the cyclist
2016-2-12
% Made up some pretend data
N = 1000;
A = randn(N);
% Preallocate memory for the pdfs
Y = zeros(N);
% Calculate the pdfs
for nr = 1:N
Y(nr,:) = normpdf(A(nr,:),mean(A(nr,:)),std(A(nr,:)));
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Descriptive Statistics and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!