% compares spectra with noise and with noise removed by bias.m and darkcurrent.m

z = input('Enter the index of the function to plot:')

figure(z)
clf
hold on

m = coord(z);
plot([1:len(z)], meas_fn(z,1:len(z)), 'g');
plot([1:len(z)], clean_mfn(z,1:len(z)), 'b');
plot([1:len(z)], clean_mfn(z,1:len(z)) - meas_fn(z,1:len(z)), 'r');
title('green = noisy, blue = noise removed, red = difference');

hold off