% ***********************************************************************
% protein.m
% ***********************************************************************
%
% Data description:
% specific absorption coefficient of protein (400-2500nm), with a  
% resolution of 5nm
%
% Prepared by: Gladimir V. G. Baranoski on November 2010
%
% ***********************************************************************
%
% Original data source:
% 
% S. Jacquemoud, S.L. Ustin, J. Verdebout, G. Schmuck, G. Andreoli
% and B. Hosgood, "Estimating leaf biochemistry using PROSPECT leaf 
% optical properties model", Remote Sensing of Environment, V. 56, 
% N. 3, pp. 194-202, June 1996.
%
% ***********************************************************************%

clear all;

p(1)=9.96;
w(1)=400;
for i=2:80
    p(i)=9.96;
    w(i)=w(i-1)+5;
end

%from 800nm to 2500nm
data=[
  10.04
  9.73 
  10.19
  9.87
  9.73 
  9.01 
  10.09 
  9.85 
  8.65 
  9.11 
  8.07 
  7.40 
  8.77 
  8.85 
  8.72 
  8.87
  8.79
  8.69 
  8.63 
  8.58 
  8.68
  8.80 
  8.69 
  8.64 
  8.77 
  8.49
  8.43 
  8.15 
  8.02 
  7.89 
  7.96 
  7.88
  7.69 
  7.71
  7.52
  7.64 
  7.55 
  7.48 
  7.36
  7.72 
  7.51 
  7.47 
  7.27 
  7.28 
  7.36
  7.39 
  7.54 
  7.58 
  7.78 
  7.84 
  7.81 
  7.49
  7.63 
  7.63
  7.57 
  7.68 
  7.49
  7.54 
  7.32 
  7.41 
  7.28 
  7.37 
  7.26 
  7.25 
  7.25 
  6.91 
  7.03 
  7.14 
  7.07 
  7.01 
  7.01 
  7.25 
  6.87 
  7.17 
  7.16 
  7.27 
  7.07 
  7.29 
  7.22 
  6.86 
  6.83 
  7.06 
  6.91 
  6.93 
  6.94 
  6.79 
  6.59 
  6.54 
  6.52 
  6.39 
  6.38 
  6.35 
  6.05 
  5.93 
  6.21 
  6.33 
  6.19 
  6.22 
  6.06 
  6.32 
  6.34 
  6.19 
  6.26 
  6.24 
  6.18 
  6.15 
  6.07 
  6.06 
  6.28 
  6.05 
  6.18 
  6.53 
  6.33 
  5.92 
  6.16 
  6.33 
  6.51 
  6.35 
  6.52 
  6.58 
  6.55 
  6.66 
  7.05 
  7.07 
  6.85 
  7.51 
  7.70 
  7.94 
  8.38 
  8.88 
  8.69 
  8.58 
  9.16 
  9.21 
  9.19 
  9.42 
  9.56 
  10.19
  10.74
  11.07
  11.25
  11.41
  11.20
  11.29
  11.57
  11.34
  11.10
  11.52
  11.17
  11.17
  11.21
  10.75
  10.76
  10.98
  11.08
  11.38
  11.31
  11.34
  11.30
  11.10
  11.41
  11.06
  11.07
  10.88
  11.02
  10.95
  11.15
  11.09
  10.64
  10.86
  10.79
  10.87
  10.88
  11.11
  11.72
  11.92
  12.66
  13.39
  14.23
  14.92
  15.72
  16.06
  16.02
  16.49
  16.82
  16.85
  17.29
  16.92
  16.90
  16.49
  16.40
  16.37 
  15.93
  16.02
  15.26
  14.78
  14.50
  14.39
  13.95
  13.67
  13.56
  13.25
  13.22
  13.24
  13.20
  12.99
  12.82
  12.73
  12.30
  12.09
  12.09
  11.96
  11.72
  12.16
  11.93
  11.79
  12.03
  12.70
  13.61
  14.74
  15.92
  18.41
  20.79
  23.30
  24.72
  26.80
  28.17
  29.30
  29.37
  30.01
  30.76
  30.76
  30.69
  31.27
  30.52
  30.91
  31.00
  30.63
  30.06
  30.42
  30.29
  30.12
  29.99
  29.48
  30.47
  30.99
  31.99
  33.47
  35.76
  38.29
  40.32
  42.19
  43.24
  42.73
  41.77
  40.65
  39.60
  39.80
  39.35
  39.43
  39.80
  39.74
  40.20
  40.52
  40.31
  40.98
  41.63
  42.63
  43.65
  45.62
  46.64
  47.78
  48.69
  49.74
  50.40 
  50.63
  50.44
  49.54
  49.41
  49.09 
  48.32 
  48.11
  46.97
  46.28 
  44.85 
  44.19 
  43.54 
  43.98 
  45.09 
  46.77 
  49.10 
  51.89 
  54.67 
  57.54 
  60.58 
  62.71 
  64.36 
  66.40 
  68.31 
  69.16 
  69.97 
  70.75 
  70.29 
  69.39 
  68.70 
  68.25 
  67.35 
  67.80
  67.79
  67.76
  68.42
  67.33
  67.34 
  65.99
  65.00
  63.89
  64.05
  63.20
  62.69
  63.11
  61.07
  64.01
  64.00
  63.79
  63.86
  66.18
  65.85 
  67.72
  69.09 
  71.18
  75.81
  76.40
  79.19
  80.45
  80.71
  79.90
  77.83
  80.85
  82.27
  80.66
  78.93
];
  
j=1;
for i=81:421
    p(i)=data(j);
    j=j+1;
    w(i)=w(i-1)+5;
end
    

fid=fopen('protein400-2500.txt','wb');
for i=1:1:421
    fprintf(fid,'%d %3.4g \n',w(i),p(i));
end
  
fclose(fid);

plot(w,p,'b-','linewidth',3);
axis([400 2500 0 100]);
set(gca,'FontSize', 14);
grid on
title('Protein','fontsize',14)
ylabel('s.a.c. (cm^2 g^{-1}{})','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','protein.png');
close 
