tuttelikz

Biomedical Optics. Chapter 1

Sep 5th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.35 KB | None | 0 0
  1. clear all; close all; clc;
  2. %
  3. % filename = 'blood.txt';
  4. % delimiterIn = ' ';
  5. % headerlinesIn = 2;
  6. % A = importdata(filename,delimiterIn,headerlinesIn);
  7.  
  8. filename = 'blood.xlsx';
  9. sheet = 1;
  10. xlRange = 'C3:G378';
  11.  
  12. subsetA = xlsread(filename,sheet,xlRange);
  13.  
  14. filename2 = 'water_absorption.xlsx';
  15. sheet = 1;
  16. xlRange = 'E1:F232';
  17.  
  18. subsetB = xlsread(filename2,sheet,xlRange);
  19.  
  20. figure()
  21. semilogy(subsetA(:,1),subsetA(:,2));
  22. title('Molar Extinction Coefficient:')
  23. xlabel('Wavelength(nm)');
  24. ylabel('Molar extinction coefficient (cm-1/M');
  25. grid on
  26. hold on
  27. semilogy(subsetA(:,1),subsetA(:,3));
  28. legend('HbO2','Hb')
  29. hold off
  30.  
  31.  
  32. figure()
  33. loglog(subsetB(:,1),subsetB(:,2));
  34. title('Absorption spectrum')
  35. xlabel('Wavelength(nm)');
  36. ylabel('Absorption (cm-1');
  37. grid on
  38. hold on
  39. loglog(subsetA(:,1),subsetA(:,4));
  40. loglog(subsetA(:,1),subsetA(:,5));
  41. legend('Water','HbO2','Hb')
  42. hold off
  43.  
  44. % hold on
  45. % semilogy(subsetA(:,1),subsetA(:,3));
  46. %
  47. % legend('HbO2','Hb')
  48. % hold off
  49.  
  50. % figure()
  51. % figure()
  52. % semilogy(subsetA(:,1),subsetA(:,2));
  53. % title('Molar Extinction Coefficient:')
  54. % xlabel('Wavelength(nm)');
  55. % ylabel('Molar extinction coefficient (cm-1/M');
  56. % grid on
  57. %
  58. % hold on
  59. % semilogy(subsetA(:,1),subsetA(:,3));
  60. %
  61. % legend('HbO2','Hb')
  62. % hold off
  63.  
  64. % for k = [3, 5]
  65. %    disp(A.colheaders{1, k})
  66. %    disp(A.data(:, k))
  67. %    disp(' ')
  68. % end
Advertisement
Add Comment
Please, Sign In to add comment