55 lines
1.6 KiB
Matlab
55 lines
1.6 KiB
Matlab
% Gitter für lambda0 und S0
|
|
lambda0_vec = linspace(1260,1360,200);
|
|
S0_vec = linspace(0.06,0.1,200);
|
|
[Lambda0, S0] = meshgrid(lambda0_vec, S0_vec);
|
|
|
|
% Festen Betriebsparameter
|
|
lambda = 1293; % nm
|
|
L = 1; % km
|
|
|
|
% Dispersion berechnen (lineare Näherung)
|
|
D = S0 .* ( lambda - Lambda0 ) * L;
|
|
% D = (S0./4) .* ( lambda - (Lambda0.^4)./(lambda^3) ) * L;
|
|
|
|
%% 2D-Konturplot nur mit Linien und Text
|
|
figure('Color','w');
|
|
hold on
|
|
|
|
% Konturlinien
|
|
numLevels = 10;
|
|
levels = linspace(min(D(:)), max(D(:)), numLevels);
|
|
[C,h] = contour(S0, Lambda0, D, levels, ...
|
|
'LineWidth',1.5, ...
|
|
'ShowText','on', ...
|
|
'LabelFormat','%0.1f');
|
|
|
|
% cbrewer2-Colormap für die Linien
|
|
cmap = cbrewer2('div','RdYlGn', numLevels);
|
|
colormap(cmap);
|
|
|
|
% Achsenlinien
|
|
% yline(1310, '--k','ZDW_{mean}','LabelVerticalAlignment','top','LabelHorizontalAlignment','center');
|
|
x0 = 0.09;
|
|
% xline(x0, '--k','S_{0}','LabelHorizontalAlignment','left');
|
|
|
|
% Gaussian auf der x-Linie (S0 = 0.09)
|
|
mu_zwd = 1310; % nm
|
|
sigma_zwd = 2; % nm
|
|
zwd_vals = linspace(min(lambda0_vec), max(lambda0_vec), 500);
|
|
% PDF berechnen
|
|
gauss_pdf = (1/(sigma_zwd*sqrt(2*pi))) * exp(-0.5*((zwd_vals-mu_zwd)/sigma_zwd).^2);
|
|
% Normieren und auf eine sichtbare Breite skalieren
|
|
scale = 0.005; % passt die Maximal-Auslenkung in x-Richtung an
|
|
x_gauss = x0 + (gauss_pdf/max(gauss_pdf)) * scale;
|
|
|
|
% Plot
|
|
% plot(x_gauss, zwd_vals, 'LineWidth',2);
|
|
|
|
% Achsenbeschriftung & Titel
|
|
% Achsenbeschriftung & Titel
|
|
xlabel('S0 [ps / nm2 km]', 'FontSize', 12);
|
|
ylabel('ZDW [nm]', 'FontSize', 12);
|
|
title (sprintf('Dispersion: %d km; %d nm', L, lambda), 'FontSize', 14);
|
|
|
|
grid on
|
|
hold off |