CLEANUP - changes to folder structure
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
projects/MPI/MPI_Juni/ber_vs_er/ber_vs_er_pam4_withMPI.mat
Normal file
BIN
projects/MPI/MPI_Juni/ber_vs_er/ber_vs_er_pam4_withMPI.mat
Normal file
Binary file not shown.
44
projects/MPI/MPI_Juni/ber_vs_er/tx_signal_curve.m
Normal file
44
projects/MPI/MPI_Juni/ber_vs_er/tx_signal_curve.m
Normal file
@@ -0,0 +1,44 @@
|
||||
function tx_signal_curve(wh,options)
|
||||
arguments
|
||||
wh
|
||||
options.DisplayName = '';
|
||||
end
|
||||
|
||||
M = wh.parameter.M.values(1);
|
||||
datarate = wh.parameter.datarate.values(1);
|
||||
sirs = wh.parameter.sir.values(1);
|
||||
mpi_len = wh.parameter.mpi_pathlen.values(1);
|
||||
laser_linewidths = wh.parameter.laser_linewidth.values(1);
|
||||
pn_key = wh.parameter.pn_key.values;
|
||||
vbias_rel = wh.parameter.vbias_rel.values(1);
|
||||
rop = wh.parameter.rop.values(1);
|
||||
clipfactor = wh.parameter.clipfactor.values;
|
||||
rrcalpha = wh.parameter.rrcalpha.values(1);
|
||||
% Create the initial plot
|
||||
figure(4);
|
||||
cols = linspecer(6);
|
||||
cnt = 0;
|
||||
|
||||
|
||||
bers(:) = wh.getStoValue('ber',M,datarate,sirs,mpi_len,laser_linewidths,pn_key,vbias_rel,rop,clipfactor, rrcalpha);
|
||||
ers(:) = wh.getStoValue('er',M,datarate,sirs,mpi_len,laser_linewidths,pn_key,vbias_rel,rop,clipfactor, rrcalpha);
|
||||
|
||||
dn = ['M: ',num2str(M),'; Rate: ',num2str(datarate),'; SIR ',num2str(sirs), 'dB; lw: ',num2str(laser_linewidths.*1e-6),' MHz'];
|
||||
|
||||
hold on; % Retain the plot so new points can be added without complete redraw
|
||||
% scatter(clipfactor,bers,"LineWidth",1,"Marker",".","DisplayName",string(dn),"MarkerEdgeColor",cols(cnt,:),'HandleVisibility','off');
|
||||
yyaxis left
|
||||
plot(clipfactor,bers,"LineWidth",1,"Marker",".","DisplayName",'BER');
|
||||
yline(3.8e-3,'DisplayName','HD-FEC','HandleVisibility','off');
|
||||
set(gca,'yscale','log');
|
||||
grid on;
|
||||
ylim([1e-5,4e-2])
|
||||
|
||||
yyaxis right
|
||||
plot(clipfactor,ers,"LineWidth",1,"Marker",".","DisplayName",'Extinction Ratio in dB');
|
||||
xlabel('Clip Factor');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
title(['Bit Error Rate vs. Clip Factor: ',dn]);
|
||||
|
||||
legend
|
||||
end
|
||||
Reference in New Issue
Block a user