TP-telecommunications/TP4/code/modulations.m

48 lines
777 B
Mathematica
Raw Normal View History

2023-06-20 19:23:24 +00:00
clear;
close all;
load('EbN0_db');
figure;
load('ASK4');
semilogy(EbN0_db, smoothdata(TEBs));
hold;
load('QPSK');
semilogy(EbN0_db, smoothdata(TEBs));
load('PSK8');
semilogy(EbN0_db, smoothdata(TEBs));
load('QAM16');
semilogy(EbN0_db, smoothdata(TEBs));
title("TEB = f(E_b/N_0)");
xlabel("E_b/N_0 (dB)");
ylabel("TEB");
legend("4-ASK", "QPSK", "8-PSK", "16-QAM");
%%
figure;
load('ASK4');
plot(smoothdata(DSP)/max(smoothdata(DSP)));
hold;
load('QPSK');
plot(smoothdata(DSP)/max(smoothdata(DSP)));
load('PSK8');
plot(smoothdata(DSP)/max(smoothdata(DSP)));
load('QAM16');
plot(smoothdata(DSP)/max(smoothdata(DSP)));
title("DSP des modulations");
xlabel("Fréquence (Hz)");
ylabel("Amplitude");
axis tight;
xlim([0 6000]);
legend("4-ASK", "QPSK", "8-PSK", "16-QAM");