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

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