필터 지우기
필터 지우기

how to generate samples uisng pseudo random generator

조회 수: 2 (최근 30일)
Thirunavukkarasu
Thirunavukkarasu 2014년 8월 27일
댓글: Star Strider 2014년 8월 30일
how to generate xor samples using pseudo random number generator
  댓글 수: 2
dpb
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.
Thirunavukkarasu
Thirunavukkarasu 2014년 8월 29일
XOR input samples were generated by using a threshold function for 1000 values from a uniformly distributed pseudorandom number generator. The threshold function had a threshold level of 0.5. Sample = ( 1 ; value > 0:5 0 ; value >= 0:5

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
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
Thirunavukkarasu
Thirunavukkarasu 2014년 8월 30일
value is 1 when sample value greater than 0.5 and 0 when it is less than or equal to 0.5
Star Strider
Star Strider 2014년 8월 30일
That is exactly what ‘rn’ does. (The original continuous vector is ‘rv’.)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 8월 30일
inputSamples = rand(1,1000) > 0.5;

카테고리

Help CenterFile Exchange에서 Big Data Processing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by