% ***********************************************************************
% antidermal.m
% ***********************************************************************
%
% Data description:
% refractive index (real part) of the wet antidermal cell wall (400-2500nm),
% computed using expression presented in the work by Baranoski and
% the water refractive index provided by Palmer and Williams,
% with a resolution of 5nm:
%
% Prepared by: Gladimir V. G. Baranoski on November 2008
%
% ***********************************************************************
%
% Original data sources:
% 
% G.V.G. Baranoski "Modeling the interaction of infrared radiation 
% (750 to 2500nm) with bifacial and unifacial plant leaves",
% Remote Sensing of Environment, 100, pp. 335-347, 2006.
%
% K.F. Palmer and D. Williams, Optical Properties of water in the near 
% infrared, Journal of the Optical Society of America, V.64, 
% pp. 1107-1110, August, 1974.
%
% ***********************************************************************
clear all
data=[
1.419 
1.419 
1.418 
1.417 
1.417 
1.416 
1.415 
1.415 
1.414 
1.414 
1.414 
1.413 
1.413 
1.412 
1.412 
1.412 
1.412 
1.412 
1.412 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.411 
1.41 
1.41 
1.41 
1.41 
1.41 
1.41 
1.41 
1.41 
1.41 
1.41 
1.41 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.409 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.408 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.407 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.406 
1.405 
1.405 
1.405 
1.405 
1.405 
1.405 
1.405 
1.405 
1.405 
1.405 
1.405 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.404 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.403 
1.402 
1.402 
1.402 
1.402 
1.402 
1.402 
1.402 
1.402 
1.402 
1.402 
1.401 
1.401 
1.401 
1.401 
1.401 
1.401 
1.401 
1.401 
1.401 
1.401 
1.401 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.4 
1.399 
1.399 
1.399 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.398 
1.397 
1.397 
1.397 
1.397 
1.397 
1.397 
1.397 
1.397 
1.397 
1.396 
1.396 
1.396 
1.396 
1.396 
1.396 
1.396 
1.396 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.395 
1.394 
1.394 
1.394 
1.394 
1.394 
1.393 
1.393 
1.393 
1.393 
1.393 
1.393 
1.393 
1.393 
1.392 
1.392 
1.392 
1.392 
1.392 
1.392 
1.392 
1.392 
1.392 
1.391 
1.391 
1.391 
1.39 
1.39 
1.39 
1.39 
1.39 
1.389 
1.389 
1.389 
1.388 
1.388 
1.388 
1.388 
1.388 
1.388 
1.387 
1.387 
1.387 
1.387 
1.387 
1.387 
1.387 
1.386 
1.386 
1.385 
1.385 
1.385 
1.385 
1.384 
1.384 
1.384 
1.383 
1.383 
1.382 
1.382 
1.382 
1.382 
1.381 
1.381 
1.381 
1.381 
1.381 
1.38 
1.38 
1.38 
1.379 
1.379 
1.379 
1.379 
1.379 
1.379 
1.378 
1.378 
1.377 
1.377 
1.377 
1.377 
1.376 
1.376 
1.376 
1.376 
1.375 
1.375 
1.374 
1.374 
1.374 
1.373 
1.373 
1.372 
1.372 
1.371 
];

fid=fopen('raH400-2500.txt','wb');

w(1)=400;
 
fprintf(fid,'%d %3.4g \n',w(1),data(1));

for i=2:421
    w(i)=w(i-1)+5;
    fprintf(fid,'%d %3.4g \n',w(i),data(i));
end

fclose(fid);



plot(w,data,'b-','linewidth',3);
axis([400 2500 1.3 1.5]);
set(gca,'FontSize', 14);
grid on
title('Wet Antidermal Cell Wall','fontsize',14)
ylabel('refractive index','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','ref_antidermal.png');
close 


