how to generate samples uisng pseudo random generator
1 回表示 (過去 30 日間)
古いコメントを表示
how to generate xor samples using pseudo random number generator
2 件のコメント
dpb
2014 年 8 月 27 日
doc rand % and friends for the RNGs in Matlab
what, and how, xor comes into play is totally unclear from what little was provided.
採用された回答
Star Strider
2014 年 8 月 27 日
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 件のコメント
Star Strider
2014 年 8 月 30 日
That is exactly what ‘rn’ does. (The original continuous vector is ‘rv’.)
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!