how to generate samples uisng pseudo random generator
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Thirunavukkarasu
el 27 de Ag. de 2014
Comentada: Star Strider
el 30 de Ag. de 2014
how to generate xor samples using pseudo random number generator
2 comentarios
dpb
el 27 de Ag. de 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.
Respuesta aceptada
Star Strider
el 27 de Ag. de 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 comentarios
Star Strider
el 30 de Ag. de 2014
That is exactly what ‘rn’ does. (The original continuous vector is ‘rv’.)
Más respuestas (1)
Ver también
Categorías
Más información sobre Random Number Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!