Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % 13.11.2019
- % 165678 Tomasz Kisielewski
- % Zadanie 4 Generowanie ciagow pseudoprzypadkowych
- N = 15;
- M = 3;
- O = [2, 3, 4];
- % input = randi([0 1], 1, N);
- output(1, 2:N) = input(1, 1:N-1);
- for i=1:1:M
- output(1, 1) = bitxor(output(1, 1), output(1, O(i)));
- end
- autocorr = xcorr(2*output-1);
- figure;
- stairs(output);
- ylim([-0.5 1.5]);
- figure;
- plot(autocorr);
Advertisement
Add Comment
Please, Sign In to add comment