% ***********************************************************************
% wax.m
% ***********************************************************************
%
% Data description:
% refractive index (real part) of the epicuticular wax (400-2500nm),
% derived from the theoretical works by Vanderbilt and Grant and by
% Kuusk, with resolution of 5nm
%
% Prepared by: Gladimir V. G. Baranoski on November 2010
%
% ***********************************************************************
%
% Original data sources and references:
% 
% V.C. Vanderbilt, L. Grant, "Plant Canopy Specular Reflectance Model",
% IEEE Transactions on Geoscience and Remote Sensing, V. 23, N. 5,
% pp. 722-730, September 1985.
%
% A. Kuusk, "A Multispectral Canopy Reflectance Model", Remote Sensing of
% Environment, V. 50, pp. 75-82, 1994.
%
% ***********************************************************************

clear all;

data=[
1.54 
1.539 
1.537 
1.536 
1.534 
1.533 
1.532 
1.531 
1.529 
1.528 
1.527 
1.526 
1.525 
1.524 
1.523 
1.522 
1.521 
1.52 
1.519 
1.518 
1.517 
1.516 
1.515 
1.514 
1.514 
1.513 
1.512 
1.511 
1.511 
1.51 
1.509 
1.508 
1.508 
1.507 
1.506 
1.506 
1.505 
1.505 
1.504 
1.503 
1.503 
1.502 
1.502 
1.501 
1.501 
1.5 
1.5 
1.499 
1.499 
1.498 
1.498 
1.497 
1.497 
1.496 
1.496 
1.496 
1.495 
1.495 
1.494 
1.494 
1.493 
1.493 
1.493 
1.492 
1.492 
1.491 
1.491 
1.491 
1.49 
1.49 
1.489 
1.489 
1.489 
1.488 
1.488 
1.488 
1.487 
1.487 
1.487 
1.486 
1.486 
1.486 
1.485 
1.485 
1.485 
1.485 
1.484 
1.484 
1.484 
1.484 
1.483 
1.483 
1.483 
1.483 
1.482 
1.482 
1.482 
1.482 
1.482 
1.481 
1.481 
1.481 
1.481 
1.481 
1.481 
1.48 
1.48 
1.48 
1.48 
1.48 
1.48 
1.479 
1.479 
1.479 
1.479 
1.479 
1.479 
1.478 
1.478 
1.478 
1.478 
1.478 
1.478 
1.478 
1.477 
1.477 
1.477 
1.477 
1.477 
1.476 
1.476 
1.476 
1.476 
1.476 
1.476 
1.475 
1.475 
1.475 
1.475 
1.475 
1.475 
1.474 
1.474 
1.474 
1.474 
1.474 
1.473 
1.473 
1.473 
1.473 
1.473 
1.472 
1.472 
1.472 
1.472 
1.472 
1.471 
1.471 
1.471 
1.471 
1.471 
1.47 
1.47 
1.47 
1.47 
1.47 
1.469 
1.469 
1.469 
1.469 
1.468 
1.468 
1.468 
1.468 
1.468 
1.467 
1.467 
1.467 
1.467 
1.467 
1.466 
1.466 
1.466 
1.466 
1.465 
1.465 
1.465 
1.465 
1.464 
1.464 
1.464 
1.464 
1.464 
1.463 
1.463 
1.463 
1.463 
1.462 
1.462 
1.462 
1.462 
1.461 
1.461 
1.461 
1.461 
1.46 
1.46 
1.46 
1.46 
1.459 
1.459 
1.459 
1.459 
1.459 
1.458 
1.458 
1.458 
1.458 
1.457 
1.457 
1.457 
1.457 
1.456 
1.456 
1.456 
1.456 
1.455 
1.455 
1.455 
1.455 
1.454 
1.454 
1.454 
1.454 
1.453 
1.453 
1.453 
1.453 
1.452 
1.452 
1.452 
1.451 
1.451 
1.451 
1.451 
1.45 
1.45 
1.45 
1.45 
1.449 
1.449 
1.449 
1.449 
1.448 
1.448 
1.448 
1.448 
1.447 
1.447 
1.447 
1.447 
1.446 
1.446 
1.446 
1.446 
1.445 
1.445 
1.445 
1.445 
1.444 
1.444 
1.444 
1.443 
1.443 
1.443 
1.443 
1.442 
1.442 
1.442 
1.442 
1.441 
1.441 
1.441 
1.441 
1.44 
1.44 
1.44 
1.44 
1.439 
1.439 
1.439 
1.439 
1.438 
1.438 
1.438 
1.438 
1.437 
1.437 
1.437 
1.437 
1.436 
1.436 
1.436 
1.435 
1.435 
1.435 
1.435 
1.434 
1.434 
1.434 
1.434 
1.433 
1.433 
1.433 
1.433 
1.432 
1.432 
1.432 
1.432 
1.431 
1.431 
1.431 
1.431 
1.43 
1.43 
1.43 
1.43 
1.429 
1.429 
1.429 
1.429 
1.429 
1.428 
1.428 
1.428 
1.428 
1.427 
1.427 
1.427 
1.427 
1.426 
1.426 
1.426 
1.426 
1.425 
1.425 
1.425 
1.425 
1.424 
1.424 
1.424 
1.424 
1.424 
1.423 
1.423 
1.423 
1.423 
1.422 
1.422 
1.422 
1.422 
1.421 
1.421 
1.421 
1.421 
1.421 
1.42 
1.42 
1.42 
1.42 
1.42 
1.419 
1.419 
1.419 
1.419 
1.418 
1.418 
1.418 
1.418 
1.418 
1.417 
1.417 
1.417 
1.417 
1.417 
1.416 
1.416 
1.416 
1.416 
1.416 
1.415 
1.415 
1.415 
1.415 
1.415 
1.414 
1.414 
1.414 
1.414 
1.414 
1.413 
1.413 
1.413 
1.413 
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.41 
1.41 
1.41 
1.41 
];

fid=fopen('rcH400-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.40 1.55]);
set(gca,'FontSize', 14);
grid on
title('Epicuticular Wax','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_wax.png');
close 



