X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=chromaticDispersionTest.m;h=513738f29e8e4c9db5724d4b09141850390cdb7b;hb=601f851007c30d9497faa0c3aec58d33be2b9fa4;hp=81af8b179b5a63a825aca51f2fd4c4afabee4a76;hpb=1eeb62fbc496ed5c170d199143ad53e28122d29c;p=4yp.git diff --git a/chromaticDispersionTest.m b/chromaticDispersionTest.m index 81af8b1..513738f 100644 --- a/chromaticDispersionTest.m +++ b/chromaticDispersionTest.m @@ -7,17 +7,29 @@ x = 10 * normpdf(1:30, 10, 3); xCD = chromaticDispersion(x, 20, 1550, 30, Tsamp); -figure(1); -subplot(211); +figure(10001); +subplot(121); plot(abs(x) .^ 2); axis([0 30 -Inf Inf]); title('Before dispersion'); ylabel('Power (arb. unit)'); -subplot(212); +xlabel('Time (arb. unit)'); +subplot(122); plot(abs(xCD) .^ 2) axis([20 50 -Inf Inf]); title('After dispersion'); -xlabel('Time (arb. unit)'); -ylabel('Power (arb. unit)'); +xlabel('Time (arb.~unit)'); +ylabel('Power (arb.~unit)'); + +subplot(121); +formatFigure; +subplot(122) +formatFigure; +set(figure(10001), 'Units', 'centimeters', ... + 'Position', [0 0 24 8], 'PaperPositionMode', 'auto'); +subplot(121); +set(gca, 'XTick', 0:5:30); +subplot(122); +set(gca, 'XTick', 20:5:50); %saveas(gcf, 'dispersionTest.png');