% ***********************************************************************
% hemoglobin_ri.m
% ***********************************************************************
%
% Data description:
% The refractive indices of hemoglobin solution with concentration of 
% 330g/L with a resolution of 5nm.
%
% Prepared by: Spencer Van Leeuwen on October 2016
%
% ***********************************************************************
%
% Original data source:
%     M. Friebel, M. Meinke. Model function to calculate the refractive 
%     index of native hemoglobin in the wavelength range of 250-1100nm 
%     dependent on concentration. J. Biomed. Opt. 11, 3 (2006), 
%     034021–1–034021–10.
%
% ***********************************************************************

M = [...
 2.5000000e+02, 1.4795705; ...
 2.5500000e+02, 1.4738542; ...
 2.6000000e+02, 1.4694449; ...
 2.6500000e+02, 1.4656760; ...
 2.7000000e+02, 1.4625901; ...
 2.7500000e+02, 1.4601840; ...
 2.8000000e+02, 1.4581394; ...
 2.8500000e+02, 1.4572071; ...
 2.9000000e+02, 1.4550720; ...
 2.9500000e+02, 1.4535550; ...
 3.0000000e+02, 1.4506576; ...
 3.0500000e+02, 1.4486492; ...
 3.1000000e+02, 1.4475384; ...
 3.1500000e+02, 1.4466740; ...
 3.2000000e+02, 1.4458092; ...
 3.2500000e+02, 1.4450560; ...
 3.3000000e+02, 1.4443023; ...
 3.3500000e+02, 1.4429901; ...
 3.4000000e+02, 1.4416782; ...
 3.4500000e+02, 1.4401437; ...
 3.5000000e+02, 1.4396756; ...
 3.5500000e+02, 1.4384317; ...
 3.6000000e+02, 1.4372772; ...
 3.6500000e+02, 1.4341165; ...
 3.7000000e+02, 1.4307402; ...
 3.7500000e+02, 1.4277230; ...
 3.8000000e+02, 1.4258561; ...
 3.8500000e+02, 1.4229320; ...
 3.9000000e+02, 1.4212441; ...
 3.9500000e+02, 1.4190342; ...
 4.0000000e+02, 1.4188566; ...
 4.0500000e+02, 1.4194428; ...
 4.1000000e+02, 1.4237892; ...
 4.1500000e+02, 1.4309732; ...
 4.2000000e+02, 1.4368233; ...
 4.2500000e+02, 1.4402802; ...
 4.3000000e+02, 1.4426621; ...
 4.3500000e+02, 1.4406249; ...
 4.4000000e+02, 1.4387991; ...
 4.4500000e+02, 1.4376486; ...
 4.5000000e+02, 1.4364095; ...
 4.5500000e+02, 1.4342328; ...
 4.6000000e+02, 1.4332600; ...
 4.6500000e+02, 1.4325082; ...
 4.7000000e+02, 1.4318892; ...
 4.7500000e+02, 1.4303345; ...
 4.8000000e+02, 1.4298485; ...
 4.8500000e+02, 1.4293624; ...
 4.9000000e+02, 1.4277651; ...
 4.9500000e+02, 1.4271469; ...
 5.0000000e+02, 1.4265288; ...
 5.0500000e+02, 1.4266171; ...
 5.1000000e+02, 1.4256391; ...
 5.1500000e+02, 1.4250655; ...
 5.2000000e+02, 1.4244919; ...
 5.2500000e+02, 1.4241169; ...
 5.3000000e+02, 1.4237419; ...
 5.3500000e+02, 1.4230077; ...
 5.4000000e+02, 1.4233383; ...
 5.4500000e+02, 1.4237131; ...
 5.5000000e+02, 1.4240878; ...
 5.5500000e+02, 1.4239556; ...
 5.6000000e+02, 1.4227576; ...
 5.6500000e+02, 1.4226694; ...
 5.7000000e+02, 1.4225813; ...
 5.7500000e+02, 1.4229338; ...
 5.8000000e+02, 1.4232862; ...
 5.8500000e+02, 1.4235285; ...
 5.9000000e+02, 1.4227043; ...
 5.9500000e+02, 1.4221100; ...
 6.0000000e+02, 1.4215157; ...
 6.0500000e+02, 1.4210535; ...
 6.1000000e+02, 1.4205913; ...
 6.1500000e+02, 1.4205252; ...
 6.2000000e+02, 1.4204592; ...
 6.2500000e+02, 1.4193064; ...
 6.3000000e+02, 1.4192184; ...
 6.3500000e+02, 1.4190865; ...
 6.4000000e+02, 1.4189545; ...
 6.4500000e+02, 1.4189985; ...
 6.5000000e+02, 1.4190425; ...
 6.5500000e+02, 1.4190865; ...
 6.6000000e+02, 1.4191305; ...
 6.6500000e+02, 1.4181977; ...
 6.7000000e+02, 1.4183296; ...
 6.7500000e+02, 1.4184615; ...
 6.8000000e+02, 1.4185933; ...
 6.8500000e+02, 1.4188351; ...
 6.9000000e+02, 1.4190768; ...
 6.9500000e+02, 1.4193186; ...
 7.0000000e+02, 1.4195604; ...
 7.0500000e+02, 1.4194175; ...
 7.1000000e+02, 1.4182091; ...
 7.1500000e+02, 1.4180664; ...
 7.2000000e+02, 1.4179236; ...
 7.2500000e+02, 1.4176601; ...
 7.3000000e+02, 1.4173965; ...
 7.3500000e+02, 1.4171330; ...
 7.4000000e+02, 1.4168695; ...
 7.4500000e+02, 1.4169024; ...
 7.5000000e+02, 1.4169353; ...
 7.5500000e+02, 1.4169683; ...
 7.6000000e+02, 1.4159366; ...
 7.6500000e+02, 1.4159586; ...
 7.7000000e+02, 1.4159805; ...
 7.7500000e+02, 1.4160025; ...
 7.8000000e+02, 1.4160244; ...
 7.8500000e+02, 1.4157940; ...
 7.9000000e+02, 1.4155636; ...
 7.9500000e+02, 1.4153331; ...
 8.0000000e+02, 1.4151027; ...
 8.0500000e+02, 1.4148942; ...
 8.1000000e+02, 1.4146858; ...
 8.1500000e+02, 1.4134138; ...
 8.2000000e+02, 1.4132054; ...
 8.2500000e+02, 1.4133699; ...
 8.3000000e+02, 1.4135344; ...
 8.3500000e+02, 1.4136988; ...
 8.4000000e+02, 1.4138633; ...
 8.4500000e+02, 1.4140387; ...
 8.5000000e+02, 1.4142142; ...
 8.5500000e+02, 1.4143896; ...
 8.6000000e+02, 1.4145650; ...
 8.6500000e+02, 1.4149049; ...
 8.7000000e+02, 1.4152448; ...
 8.7500000e+02, 1.4145195; ...
 8.8000000e+02, 1.4148592; ...
 8.8500000e+02, 1.4150345; ...
 8.9000000e+02, 1.4152098; ...
 8.9500000e+02, 1.4153851; ...
 9.0000000e+02, 1.4155604; ...
 9.0500000e+02, 1.4157028; ...
 9.1000000e+02, 1.4158452; ...
 9.1500000e+02, 1.4159876; ...
 9.2000000e+02, 1.4161301; ...
 9.2500000e+02, 1.4161739; ...
 9.3000000e+02, 1.4162177; ...
 9.3500000e+02, 1.4151951; ...
 9.4000000e+02, 1.4152389; ...
 9.4500000e+02, 1.4153046; ...
 9.5000000e+02, 1.4153702; ...
 9.5500000e+02, 1.4154359; ...
 9.6000000e+02, 1.4155016; ...
 9.6500000e+02, 1.4154578; ...
 9.7000000e+02, 1.4154140; ...
 9.7500000e+02, 1.4153702; ...
 9.8000000e+02, 1.4153264; ...
 9.8500000e+02, 1.4157096; ...
 9.9000000e+02, 1.4160928; ...
 9.9500000e+02, 1.4164760; ...
 1.0000000e+03, 1.4157914; ...
 1.0050000e+03, 1.4157586; ...
 1.0100000e+03, 1.4157258; ...
 1.0150000e+03, 1.4156930; ...
 1.0200000e+03, 1.4156601; ...
 1.0250000e+03, 1.4156054; ...
 1.0300000e+03, 1.4155507; ...
 1.0350000e+03, 1.4154960; ...
 1.0400000e+03, 1.4154414; ...
 1.0450000e+03, 1.4153976; ...
 1.0500000e+03, 1.4153538; ...
 1.0550000e+03, 1.4153101; ...
 1.0600000e+03, 1.4152663; ...
 1.0650000e+03, 1.4142427; ...
 1.0700000e+03, 1.4142864; ...
 1.0750000e+03, 1.4143302; ...
 1.0800000e+03, 1.4143739; ...
 1.0850000e+03, 1.4145051; ...
 1.0900000e+03, 1.4146363; ...
 1.0950000e+03, 1.4147674; ...
 1.1000000e+03, 1.4148986];
 
 plot(M(:,1), M(:,2), 'b', 'linewidth',1.5);
title('hemoglobin index of refraction','FontSize',14);
set(gca,'FontSize',14);
ylabel('refractive index','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
axis([250 1100 1.4 1.48]);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
grid on;

pause;
print -dpng hemoglobin_ri.png -r100;
close;
