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!