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

采纳的回答

the cyclist
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 CenterFile Exchange 中查找有关 Particle & Nuclear Physics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by