How can I make a normal distribution with n*n matrix?

2 ビュー (過去 30 日間)
Amin Gan
Amin Gan 2016 年 2 月 12 日
コメント済み: Amin Gan 2016 年 2 月 12 日
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
  1 件のコメント
Amin Gan
Amin Gan 2016 年 2 月 12 日
Thank you so much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by