Fmat <- as.matrix(phytoclass::Fm)
S <- as.matrix(phytoclass::Sm)
S_weights <- as.numeric(phytoclass:::Bounded_weights(S))
S_Chl <- S[, ncol(S)]
# Run NNLS_MF_Final
result <- phytoclass:::NNLS_MF_Final(Fmat, S, S_Chl, S_weights)
Run the code above in your browser using DataLab