フィルターのクリア

creating a vector of independent random cauchy variables...

3 ビュー (過去 30 日間)
Doron
Doron 2012 年 2 月 25 日
I would like to create a "1000000 length" vector of cauchy random variables...
The code for one cauchy random variable, x, is:
x= tan(pi*(rand-0.5))
I have a few ways I can think of for generating the vector, but I want the FASTEST computational way.
Thanks
D Howard

採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 2 月 25 日
x = tan(pi*(rand(1000000,1)-0.5));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by