CLEANUP - changes to folder structure
This commit is contained in:
40
projects/MPI/MPI_Juni/extrcurve.m
Normal file
40
projects/MPI/MPI_Juni/extrcurve.m
Normal file
@@ -0,0 +1,40 @@
|
||||
function ercurve(wh)
|
||||
|
||||
M = wh.parameter.M.values(1);
|
||||
datarate = wh.parameter.datarate.values(1);
|
||||
sir = wh.parameter.sir.values(1);
|
||||
laser_linewidth = wh.parameter.laser_linewidth.values(1);
|
||||
pn_key = wh.parameter.pn_key.values(1);
|
||||
vbias_rel = wh.parameter.vbias_rel.values;
|
||||
rop = wh.parameter.rop.values;
|
||||
clipfactor = wh.parameter.clipfactor.values;
|
||||
rrcalpha = wh.parameter.rrcalpha.values(1);
|
||||
|
||||
|
||||
for vbr = vbias_rel
|
||||
|
||||
bers = wh.getStoValue('ber',M,datarate,sir,laser_linewidth,pn_key,vbr,rop,clipfactor, rrcalpha);
|
||||
rops = wh.getStoValue('rop',M,datarate,sir,laser_linewidth,pn_key,vbr,rop,clipfactor, rrcalpha);
|
||||
ers = unique(wh.getStoValue('er',M,datarate,sir,laser_linewidth,pn_key,vbr,rop,clipfactor, rrcalpha));
|
||||
|
||||
if 1 %isempty(options.DisplayName)
|
||||
dn = ['M: ',num2str(M),'; Rate: ',num2str(datarate),'; Vbias rel: ',num2str(vbr), '; ER: ', num2str(ers)];
|
||||
else
|
||||
dn = options.DisplayName;
|
||||
end
|
||||
|
||||
% Create the initial plot
|
||||
figure(43);
|
||||
hold on; % Retain the plot so new points can be added without complete redraw
|
||||
plot(rops,bers,"LineWidth",1,"LineStyle","--","Marker",".","MarkerSize",10,"DisplayName",string(dn));
|
||||
|
||||
end
|
||||
yline(3.8e-3,'DisplayName','HD-FEC');
|
||||
xlabel('Received Optical Power (dBm)');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
title('Bit Error Rate vs. Received Optical Power');
|
||||
set(gca,'yscale','log');
|
||||
grid on;
|
||||
legend
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user