https://www.mathworks.com/help/textanalytics/ref/ldamodel.logp.html
logp - Document log-probabilities and goodness of fit of LDA model - MATLAB
This MATLAB function returns the log-probabilities of documents under the LDA model ldaMdl.
goodness of fitlog probabilitieslogpdocument