how to generate samples uisng pseudo random generator
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Thirunavukkarasu
il 27 Ago 2014
Commentato: Star Strider
il 30 Ago 2014
how to generate xor samples using pseudo random number generator
2 Commenti
dpb
il 27 Ago 2014
doc rand % and friends for the RNGs in Matlab
what, and how, xor comes into play is totally unclear from what little was provided.
Risposta accettata
Star Strider
il 27 Ago 2014
I am not certain that I understand what you want to do, but I will make an attempt at answering:
nrows = 5;
s = logical(randi(2, nrows, 2)-1);
out = xor(s(:,1),s(:,2));
4 Commenti
Star Strider
il 30 Ago 2014
That is exactly what ‘rn’ does. (The original continuous vector is ‘rv’.)
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Random Number Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!