%% Filter one particular signal A=M12(:,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)); figure hold all xlim ([1526 1624]) plot(WA/1e-9,-A(:,1)); plot(WA/1e-9-.0015,avg,'LineWidth',2); title('SiWG023-C3: GC4, 19 degrees, 2000um, c'); xlabel('Wavelength (nm)'); ylabel('Loss (dB/mm)'); legend('Measurmenet','"Actual" transmission'); grid minor