Documentation 
The MFSK Modulator Baseband block modulates using the Mary frequency shift keying method. The output is a baseband representation of the modulated signal. For information about the data types each block port supports, see Supported Data Types.
To prevent aliasing from occurring in the output signal, set the sampling frequency greater than the product of M and the Frequency separation parameter. Sampling frequency is Samples per symbol divided by the input symbol period (in seconds).
The input and output signals for this block are discretetime signals.
When you set the Input type parameter to Integer, the block accepts integer values between 0 and M1. M represents the Mary number block parameter.
When you set the Input type parameter to Bit, the block accepts binaryvalued inputs that represent integers. The block collects binaryvalued signals into groups of K = log_{2}(M) bits
where
K represents the number of bits per symbol.
The input vector length must be an integer multiple of K. In this configuration, the block accepts a group of K bits and maps that group onto a symbol at the block output. The block outputs one modulated symbol, oversampled by the Samples per symbol parameter value, for each group of K bits.
The Symbol set ordering parameter indicates how the block maps a group of K input bits to a corresponding symbol. When you set the parameter to Binary, the block maps [u(1) u(2) ... u(K)] to the integer
$$\sum _{i=1}^{K}u(i){2}^{Ki}$$
and assumes that this integer is the input value. u(1) is the most significant bit.
If you set M = 8, Symbol set ordering to Binary, and the binary input word is [1 1 0], the block converts [1 1 0] to the integer 6. The block produces the same output when the input is 6 and the Input type parameter is Integer.
When you set Symbol set ordering to Gray, the block uses a Graycoded arrangement and assigns binary inputs to points of a predefined Graycoded signal constellation. The predefined Mary Graycoded signal constellation assigns the binary representation
M = 8; P = [0:M1]'; de2bi(bitxor(P,floor(P/2)), log2(M),'leftmsb')
to the P^{th} integer.
The following tables show the typical Binary to Gray mapping for M = 8.
Binary to Gray Mapping for Bits
Binary Code  Gray Code 

000  000 
001  001 
010  011 
011  010 
100  110 
101  111 
110  101 
111  100 
Binary to Gray Mapping for Integers
Binary Code  Gray Code 

0  0 
1  1 
2  3 
3  2 
4  6 
5  7 
6  5 
7  4 
In singlerate processing mode, the input and output signals have the same port sample time. The block implicitly implements the rate change by making a size change at the output when compared to the input. In this mode, the input to the block can be multiple symbols.
When you set Input type to Integer, the input can be a column vector, the length of which is the number of input symbols.
When you set Input type to Bit, the input width must be an integer multiple of K, the number of bits per symbol.
The output width equals the product of the number of input symbols and the Samples per symbol parameter value.
In multirate processing mode, the input and output signals have different port sample times. In this mode, the input to the block must be one symbol.
When you set Input type to Integer, the input must be a scalar.
When you set Input type to Bit, the input width must equal the number of bits per symbol.
The output sample time equals the symbol period divided by the Samples per symbol parameter value.
To run the MFSK Modulator block in multirate mode, set Tasking mode for periodic sample times (in Simulation > Configuration Parameters > Solver) to SingleTasking.
The number of frequencies in the modulated signal.
Indicates whether the input consists of integers or groups of bits. If you set this parameter to Bit, then the Mary number parameter must be 2^{K} for some positive integer K.
Determines how the block maps each group of input bits to a corresponding integer.
The distance between successive frequencies in the modulated signal.
Determines whether the modulated signal changes phases in a continuous or discontinuous way.
If you set the Phase continuity parameter to Continuous, then the modulated signal maintains its phase even when it changes its frequency. If you set the Phase continuity parameter to Discontinuous, then the modulated signal comprises portions of M sinusoids of different frequencies. Thus, a change in the input value sometimes causes a change in the phase of the modulated signal.
The number of output samples that the block produces for each integer or binary word in the input.
Select the rate processing option for the block.
Enforce singlerate processing — When you select this option, the input and output signals have the same port sample time. The block implements the rate change by making a size change at the output when compared to the input. The output width equals the product of the number of symbols and the Samples per symbol parameter value.
Allow multirate processing — When you select this option, the input and output signals have different port sample times. The output sample time equals the symbol period divided by the Samples per symbol parameter value.
Note: The option Inherit from input (this choice will be removed  see release notes) will be removed in a future release. See FrameBased Processing in the Communications System Toolbox™ Release Notes for more information. 
You can specify the output type of the block as either a double or a single. By default, the block sets this value to double.
Port  Supported Data Types 

Input 

Output 
