This part of the example modulates the data in the column vector signal in two different ways. The dmodce function performs both modulations and puts the results into the two-column matrix modsignal.

The first call to dmodce, which creates the first column of modsignal, tells dmodce to use QASK modulation on M symbols. The string 'qask' indicates the QASK method as well as the default square constellation configuration. In this case, the configuration implements Gray code.

The second call to dmodce, which creates the second column of modsignal, tells dmodce to use QASK modulation with a signal constellation whose configuration is represented in the vectors inphase and quadr. The variables inphase and quadr are length-M vectors that list the in-phase and quadrature components, respectively, of the points in the signal constellation. The points are listed in sequence, to associate a message symbol of k with the (k+1)st elements in inphase and quadr. Whereas Gray code labels the constellation points in a special way, this configuration lists points in a sequence that is merely convenient for creating inphase and quadr.

These lines also illustrate some common ways to manipulate matrices in MATLAB. If you are not familiar with the colon notation in MATLAB or with functions like ones and zeros, then you should consult the MATLAB documentation set.