At the start of the simulation $N_{\mathrm{sym}}$ OFDM symbols are randomly generated by producing $N_{\mathrm{sub}} \cdot N_{\mathrm{sym}}$ random $M$-QAM symbols. These OFDM symbols are then blockwise modulated via the IFFT. The respective QAM symbols are set to zero if tone nulling is activated.
If AIC is enabled, the matrix $\mathbf{C}$ is computed and saved before the start of the modulation. During the blockwise IFFT the coefficients of the AIC subcarriers are determined by a matrix multiplication on a OFDM symbol basis.
If spectral shaping with an FIR filter was choosen the impulse response $h_m$ is computed beforehand. After the modulation $x_m$ is then convoluted with $h_m$ to get the spectrally shaped output sequence $y_m$.
As a final step the output signal gets distorted by the IQ imbalance parameters if the IQ imbalance is activated.
Then the spectrum of the output signal is computed to view the impacts of the spectral shaping.