フィルターのクリア

N samples GAUSS SIMULATIONN

1 回表示 (過去 30 日間)
yuval ohayon
yuval ohayon 2018 年 11 月 17 日
回答済み: Walter Roberson 2018 年 11 月 17 日
HI, can anyyone help me in a work i need to do,
simulation of z veriable gaussion distirbution using 2 veriables (x y) uniformly distirbution where z=sqrt(-ln(X)) cos(2*pi*Y) ,again for N RANDOM NUMBERS
and to compare it to the normal distirbutiun of z? THE Answer depends on N ?
where i enter the N samples in the commands
usefull commands normpdf histogram histfit
can anyone fill the blank in my brain what the is going on ??

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 11 月 17 日
N = 1234;
minx = -78.3; maxx = 1017.88;
miny = -pi; maxy = pi;
X = rand(1,N) * (maxx - minx) + minx;
Y = rand(1,N) * (maxy - miny) + miny;
z = sqrt(-ln(X)) .* cos(2*pi*Y);

カテゴリ

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