Create a two-point distribution?
Ältere Kommentare anzeigen
I want to multiply each element of a vector by a random variable X that takes values +1 and -1 with probability 1/2. How do I create this random variable?
Antworten (1)
dk
am 17 Okt. 2019
1 Stimme
N=100;
x=sign(rand(N,1)-0.5);
1 Kommentar
kevin cecere palazzo
am 17 Okt. 2019
Kategorien
Mehr zu Inverse Gaussian Distribution finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!