Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = 15;
- M = 3;
- randombits = [1 1 0 1 0 1 0 1 0 1 0 1 0 1 0];
- o1 = 3;
- o2 = 10;
- o3 = 15;
- for i = 1:5000
- xor_value = xor(xor(randombits(o1), randombits(o2)), randombits(o3));
- randombits = [xor_value, randombits(1:end)];
- end
- autokorelacja = xcorr(2*randombits-1);
- figure;
- stairs(randombits(45:65));
- ylim([-0.5 1.5]);
- figure;
- plot(autokorelacja);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement