Matlab Tutorial

These notes hopefully serve as an introduction to the 'wonderful world' of Matlab.

They cover the basics that are needed in order to carry out multivariate analysis (MVA). Specifically they will give details of how to do and view the results of principal components analysis (PCA), discriminant function analysis (DFA) and hierarchical cluster analysis (HCA).

Author:   Roy Goodacre,

The tutorial and appendix files:

  • Tutorial: a matlab tutorial for multivariate analysis
  • Appendix: A bit about multivariate analysis.

Worked examples

  • Ampicillin in bacterial backgrounds analysed by PyMS:


  • UTI bacteria analysed by FT-IR:
  • data
  • XL file


  • Clustering toolbox – Zip-file of Matlab m-files [58 Kb]
  • PFE – Zip-file for program file editor [588 Kb]
  • opus2nt – Zip-file for the conversion program from IR Opus file format to text [27 Kb]
  • Ghost – Zip-file containing set-up for postscript viewer [4.6 Mb]


Timmins, É.M., Howell, S.A., Alsberg, B.K., Noble, W.C. and Goodacre, R. (1998) Rapid differentiation of closely related Candida species and strains by pyrolysis mass spectrometry and Fourier transform infrared spectroscopy. Journal of Clinical Microbiology 36, 367-374. [candida.pdf]

Goodacre, R., Timmins, É.M., Burton, R., Kaderbhai, N., Woodward, A.M., Kell, D.B. and Rooney, P.J. (1998) Rapid identification of urinary tract infection bacteria using hyperspectral, whole organism fingerprinting and artificial neural networks. Microbiology 144, 1157-1170. [uti.pdf]