%% Filter one particular signal A=abs(M1(:,2));%% Signal you want to filter WA = M1(:,1); %% Wavelengths of the signal you want to filter. nm = 100; coeff = ones(1, nm)/nm; fDelay = (length(coeff)-1)/2; avg = filter(coeff, 1, A(:,1)); %{ B=abs(M2(:,2));%% Signal you want to filter WB = M2(:,1); %% Wavelengths of the signal you want to filter. avgB = filter(coeff, 1, B(:,1)); C=abs(M3(:,2));%% Signal you want to filter WC = M3(:,1); %% Wavelengths of the signal you want to filter. avgC = filter(coeff, 1, C(:,1)); %} figure hold all xlim ([1526 1624]) set(gca,'Ydir','reverse') plot(WA/1e-9,A(:,1)); % plot(WA/1e-9-.0015,avg,'LineWidth',2); %{ plot(WB/1e-9,B(:,1)); plot(WB/1e-9-.0015,avgB,'LineWidth',2); plot(WC/1e-9,C(:,1)); plot(WC/1e-9-.0015,avgC,'LineWidth',2); %} title('SiWG023-C3: fin200nm ,period400nm, GC4, 250um, device b'); xlabel('Wavelength (nm)'); ylabel('Loss (dB/mm)'); legend('Device b','Device b, Fabry-Perot corrected'); grid minor