SHARE
TWEET

Untitled

a guest Nov 13th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. N = 15;
  2. M = 3;
  3.  
  4. randombits = [1 1 0 1 0 1 0 1 0 1 0 1 0 1 0];
  5.  
  6. o1 = 3;
  7. o2 = 10;
  8. o3 = 15;
  9.  
  10.  
  11. for i = 1:5000
  12.     xor_value = xor(xor(randombits(o1), randombits(o2)), randombits(o3));
  13.     randombits = [xor_value, randombits(1:end)];
  14.        
  15. end
  16.  
  17. autokorelacja = xcorr(2*randombits-1);
  18. figure;
  19. stairs(randombits(45:65));
  20. ylim([-0.5 1.5]);
  21. figure;
  22. plot(autokorelacja);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top