format long;

data_d =[3, 0.0001524019299755091, 4.334403794429018e-9;
         4, 0.0002057684061323721, 8.686010228701782e-9;
         5, 0.0002304589379197561, 9.566398539660684e-9;
         6, 0.00024385907084492034, 1.0739314200009073e-8;
         7, 0.00025194790141783554, 1.150270332706821e-8;
         8, 0.00025719858857551367, 1.2086949431706284e-8;
         9, 0.0002607871830474413, 1.3348684006718125e-8];
    
data_h = [3, 0.00015237077627326925, 4.335132098566475e-9;
          4, 0.0002057226422173164, 8.627197573914681e-9;
          5, 0.0002303948376718823, 9.64629240532687e-9;
          6, 0.00024379333255906458, 1.0748819351882154e-8;
          7, 0.0002518816004905916, 1.147106759076234e-8;
          8, 0.00025713263790486975, 1.2144315113213627e-8;
          9, 0.00026073051288978146, 1.2762724397944064e-8];
      
N = length(data_h(:,1));
deut_wavelengths = zeros(N,2);
hydr_wavelengths = zeros(N,2);
diff_wavelengths = zeros(N,2);
for i = 1:N
    deut_wavelengths(i,1) = 1/data_d(i,2);
    deut_wavelengths(i,2) = abs(1/data_d(i,2)^2*data_d(i,3));
    
    hydr_wavelengths(i,1) = 1/data_h(i,2);
    hydr_wavelengths(i,2) = abs(1/data_h(i,2)^2*data_h(i,3));
    
    diff_wavelengths(i,1) = hydr_wavelengths(i,1)-deut_wavelengths(i,1);
    diff_wavelengths(i,2) = sqrt(hydr_wavelengths(i,2)^2+deut_wavelengths(i,2)^2);
end


