stuff from star
This commit is contained in:
51
Functions/Theory/Neuer Ordner/duobinary_histogram.m
Normal file
51
Functions/Theory/Neuer Ordner/duobinary_histogram.m
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
|
||||
|
||||
figure(2)
|
||||
tiledlayout(1,3)
|
||||
cols = linspecer(5);
|
||||
cnt = 1;
|
||||
for m = [4,6,8]
|
||||
|
||||
M = m;
|
||||
fsym = 112e9;
|
||||
fdac = 256e9;
|
||||
|
||||
[Digi_sig,Symbols,Tx_bits] = PAMsource(...
|
||||
"fsym",fsym,"M",M,"order",19,"useprbs",1,...
|
||||
"fs_out",fdac,...
|
||||
"applyclipping",0,"clipfactor",1.5,...
|
||||
"applypulseform",0,"pulseformer",NaN,...
|
||||
"randkey",33,...
|
||||
"db_precode",1,"db_encode",0,...
|
||||
"mrds_code",0,"mrds_blocklength",512).process();
|
||||
|
||||
Symbols_pre = Duobinary().precode(Symbols);
|
||||
|
||||
Symbols_db = Duobinary().encode(Symbols_pre);
|
||||
|
||||
if M == 4
|
||||
Symbols_db.signal = Symbols_db.signal .*sqrt(2.5);
|
||||
elseif M == 6
|
||||
Symbols_db.signal = Symbols_db.signal .*sqrt(5.8);
|
||||
elseif M == 8
|
||||
Symbols_db.signal = Symbols_db.signal .*sqrt(10.5);
|
||||
end
|
||||
|
||||
% figure(1)
|
||||
% hold on
|
||||
% histogram(Symbols_db.signal,"EdgeAlpha",0.3,"Normalization","probability");
|
||||
|
||||
|
||||
% figure(1)
|
||||
nexttile
|
||||
hold on
|
||||
bar(unique(Symbols_db.signal),histcounts(int32(Symbols_db.signal),"Normalization","probability"),"FaceColor",cols(cnt,:),"FaceAlpha",0.6,"BarWidth",1-(0.2*cnt),"LineWidth",0.5,"EdgeColor",'black','DisplayName',['Duobinary PAM-',num2str(M)]);
|
||||
xticks(unique(Symbols_db.signal));
|
||||
ylim([0 0.26]);
|
||||
xlabel("Symbol")
|
||||
|
||||
|
||||
cnt = cnt+1,
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user