home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 6.ddi / CHEM.DI$ / PMATRIX.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  895 b   |  27 lines

  1. function [p] = pmatrix(a, c)
  2. % PMATRIX  Calculate the P-matrix calibration coefficients.
  3. %
  4. % Copyright (c) 1989-92 by The MathWorks, Inc.
  5. %
  6. %            PMATRIX calculates the P-matrix calibration coefficients
  7. %            for a given set of calibration mixtures.
  8. %
  9. %  p = pmatrix(a, c)
  10. %
  11. % Where:
  12. %
  13. %  p    is the calibration matrix
  14. %  a    is the absorbance matrix
  15. %  c    is the concentration matrix
  16. %
  17. % The concentrations of components in unknown spectra can be calculated
  18. % if the unknown absorbances are set up as a vector (for 1
  19. % unknown) or a matrix (for multiple unknowns).  The unknown matrix 
  20. % can have any available name.  For example call it "u".  The 
  21. % unknown concentrations are then given by p * u.
  22. %
  23. % For more details, refer to pages 141 and 142 of the ASTM 
  24. % publication "Computerized Quantitative Infrared Analysis".
  25. %
  26. p = c * a' * inv(a * a');
  27.