DOE points normal distrbution

Dear sir
if i have the mean and standarded deviation and I need to generate a number of points folowing the gaussien normal distrbution how can i do that please.

Respuestas (2)

David Hill
David Hill el 4 de En. de 2021
m=standard_deviation.*randn(1,1000)+mean;%generates an array of 1000 numbers

3 comentarios

Hazim Hamad
Hazim Hamad el 5 de En. de 2021
Many thanks ;
I have a question please .
if i have a mtrix of points and I need to generate new matrix include new points normally distrbuted based on each points consider as mean value for example point 1 x(1,1)= 0.1 and it is the mean and I need to generate 20 new points based on this point i created simple code but it is not working properly can you check it please.
x= [ 0.1 0.2 0.3 0.4
0.2 0.4 0.5 0.6 ] ;
% standard_deviation=0.1*x where x is avector of x1 , x2 ,x3 and x4 so the first row of x is x ( 0.1 0.2 0.3 0.4 )
% mean=x
% m=standard_deviation.*randn(1,1000)+mean
mean=x;
n=2
ndv=4
for i=1:n
for j =1:ndv
z(j,i)=mean(i,j);
z11=z'
end
end
for i=1:n
for j =1:ndv
mean1=z11;
% standard_deviation=0.1*mean(i,j);
% m=standard_deviation.*randn(1,5)+mean;
standard_deviation=0.1*mean1;
m=standard_deviation.*randn(20,4)+mean1;
end
end
Not sure I understand you completely.
x= [.1,.2,.3,.4,.2,.4,.5,.6];%is there a reason why you can't make x just a row vector?
sd=.1*x;
n=sd.*randn(20,length(x))+x;%generates 20 numbers in each column corresponding to requested standard deviation and mean
Hazim Hamad
Hazim Hamad el 6 de En. de 2021
Many Thank this is because x is a matrix of design points and each row represents a case so your solution is correct for just one row would you help make it valid for two rows please.
x= [ 0.1 0.2 0.3 0.4
0.2 0.4 0.5 0.6 ] ;
ist row is 0.1 0.2 0.3 0.4
2nd row is 0.2 0.4 0.5 0.6
regards

Iniciar sesión para comentar.

Hazim Hamad
Hazim Hamad el 26 de Mzo. de 2021

0 votos

Hi
for the random normal distrbution can you help me to use seed to obtain the same result at each trail.
Regards
Hazzim

Productos

Versión

R2020b

Preguntada:

el 4 de En. de 2021

Respondida:

el 26 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by