Files
imdd_silas/process_simulation.m
Silas Oettinghaus f5747bb863 changes from friday
2023-05-21 15:31:39 +02:00

38 lines
651 B
Matlab

figure(22)
clf
subplot(2,1,1)
hold on
plot(reference.signal(10000:end-20));
plot(rx_series(10000:end-20));
hold off
subplot(2,1,2)
hold on
plot(reference.signal(4150:4175));
plot(rx_series(4150:4175));
hold off
figure()
hold on
stem(X.signal(1,:))
stem(bitpattern(:,1)')
hold off
a = fftshift(xcorr(X.signal(1,:),circshift(bitpattern(:,1)',0)));
% BER
if (length(X.signal) ~= length(bitpattern'))
warning("TX and RX bitstreams have different length...")
end
[bits,errors,BER] = calc_ber(X.signal(:,10000:end-20),bitpattern(10000:end-19,:)',0);
disp(X.logbook);
disp(['BER: ', sprintf('%2E',BER)]);