Stuff during JLT writing...
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
|
||||
|
||||
|
||||
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
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
|
||||
% Define the filter taps
|
||||
h_ = {[1],[1 1],[1 2 1],[1 3 3 1]};
|
||||
|
||||
for i = 1:length(h_)
|
||||
h = h_{i};
|
||||
|
||||
[H, w] = freqz(h, 1, 1024, 1);
|
||||
|
||||
figure(1);
|
||||
hold on
|
||||
plot(w, 10*log10(abs(H)), 'LineWidth', 2,'DisplayName',['$(1+D)^2$']); %todo
|
||||
xlabel('Normalized Frequency');
|
||||
ylabel('Amplitude in dB');
|
||||
grid on;
|
||||
ylim([-20,10])
|
||||
end
|
||||
Reference in New Issue
Block a user