% ***********************************************************************
% sand_waterEx_1.m
% ***********************************************************************
%
% Data description:
% refractive index (imaginary part) of water (200-375nm), 
% linearly interpolated from original data (resolution of 5nm) 
%
% Prepared by: Bradley W. Kimmel on October 2013
% Modified by: T. Francis Chen on February 2014
%
% ***********************************************************************
%
% Original data source:
% 
% G.M. Hale and M.R. Querry, Optical Constants of Water in the 200-nm to
% 200-um Wavelength Region, Applied Optics, Vol. 12, No. 3, pp 555-563,
% March 1973.
%
% ***********************************************************************
clear all
data=[
1.1000e-07 
9.7800e-08 
8.5600e-08 
7.3400e-08 
6.1200e-08 
4.9000e-08 
4.5900e-08 
4.2800e-08 
3.9700e-08 
3.6600e-08 
3.3500e-08 
3.1500e-08 
2.9500e-08 
2.7500e-08 
2.5500e-08 
2.3500e-08 
2.2000e-08 
2.0500e-08 
1.9000e-08 
1.7500e-08 
1.6000e-08 
1.4960e-08 
1.3920e-08 
1.2880e-08 
1.1840e-08 
1.0800e-08 
9.9400e-09 
9.0800e-09 
8.2200e-09 
7.3600e-09 
6.5000e-09 
5.9000e-09 
5.3000e-09 
4.7000e-09 
4.1000e-09 
3.5000e-09
];

fid=fopen('sand_waterEx_1.txt','wb');
for i=1:36
    wave(i)=195+i*5;
    fprintf(fid,'%d  %3.4e \n',wave(i),data(i));
end
fclose(fid);


plot(wave,data,'b-','linewidth',3);
axis([200 375 0 1.4e-7]);
set(gca,'FontSize', 14);
grid on
title('Water','fontsize',14)
ylabel('extinction coefficient','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','sand_waterEx_1.png');
close 
   




