how to generate samples uisng pseudo random generator
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Thirunavukkarasu
am 27 Aug. 2014
Kommentiert: Star Strider
am 30 Aug. 2014
how to generate xor samples using pseudo random number generator
2 Kommentare
dpb
am 27 Aug. 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.
Akzeptierte Antwort
Star Strider
am 27 Aug. 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 Kommentare
Star Strider
am 30 Aug. 2014
That is exactly what ‘rn’ does. (The original continuous vector is ‘rv’.)
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Random Number Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!