This repositoty contains two Matlab functions in the folder Functions. PLCS_proj.m calculate latent variables that are obtain by comparing eact spectrum to two reference spectra. OptAxis4fitcdiscr.m is a function that test all possible latent variables (2 to 5) in a soft discriminant model.
The Matlab live scrip in the folder tuto demosntarte the Projection to Latent Correlative Structure with soft quadratic discriminant analysis with FTIR-ATR spectra of pulse (https://zenodo.org/record/5075052#.YOWBtehKiUk)