Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
Amin Gan
Amin Gan el 12 de Feb. de 2016
Comentada: Amin Gan el 12 de Feb. de 2016
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

Respuesta aceptada

the cyclist
the cyclist el 12 de Feb. de 2016
% 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

Más respuestas (0)

Categorías

Más información sobre Particle & Nuclear Physics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by