필터 지우기
필터 지우기

creating a vector of independent random cauchy variables...

조회 수: 2 (최근 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 CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by