Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement