central limit theorem random process

1 回表示 (過去 30 日間)
yuval ohayon
yuval ohayon 2018 年 12 月 9 日
編集済み: John D'Errico 2018 年 12 月 9 日
ho i need to generate the next equsion x[n]=sigma(w[n]) where w[n] gets probability of 1 and -1 ,and to check the charachteristic, for N LARGE enough to see the variance and the mu..well i stuck at the beginnig can genrate a vector of 1 and -1
for i=1:N
x(1,:)=(-1)^i*(rand(1,1000))
if x(1,i)<=0
x(1,i)=-1
else
x(1,i)==1
end
its get the correct vector.. any body help

回答 (1 件)

John D'Errico
John D'Errico 2018 年 12 月 9 日
編集済み: John D'Errico 2018 年 12 月 9 日
What would this do?
rand(1,N)
So then, what would this do, if I appended a round on top? I.e.,
round(rand(1,N))
What possible values could result from that? Would the possible results be equally probable? But, now what if I multuplied by 2?
round(rand(1,N))*2
Now what values can you get? Does it seem we are getting close? So what if we subtracted 1?
round(rand(1,N))*2 - 1

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by