Considering specific modes in the Harmonic analysis

How can we consider only specific modes in the harmonic analysis based on the modal participation factor in Modal analysis?

A detailed explanation of the modal expansion and selecting only certain modes for harmonic analysis is given in the attached document and the demo example provided.

Example 1 scripts 

Example 1