def MPSK_bb(N_symb,Ns,M,pulse='<STR_LIT>',alpha = <NUM_LIT>,MM=<NUM_LIT:6>):
data = np.random.randint(<NUM_LIT:0>,M,N_symb) <EOL>xs = np.exp(<NUM_LIT>*<NUM_LIT:2>*np.pi/M*data)<EOL>x = np.hstack((xs.reshape(N_symb,<NUM_LIT:1>),np.zeros((N_symb,int(Ns)-<NUM_LIT:1>))))<EOL>x =x.flatten()<EOL>if pulse.lower() == '<STR_LIT>':<EOL><INDENT>b = np.ones(int(Ns))<EOL><DEDENT>elif pulse.lower() == '<STR_LIT>':<EOL><INDENT>b = rc_imp(Ns,alpha,MM)<EOL><DEDENT>elif pulse.lower() == '<STR_LIT:src>':<EOL><INDENT>b = sqrt_rc_imp(Ns,alpha,MM)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>x = signal.lfilter(b,<NUM_LIT:1>,x)<EOL>if M == <NUM_LIT:4>:<EOL><INDENT>x = x*np.exp(<NUM_LIT>*np.pi/<NUM_LIT:4>); <EOL><DEDENT>return x,b/float(Ns),data<EOL>
Generate a complex baseband MPSK signal with pulse shaping.

Parameters
----------
N_symb : number of MPSK symbols to produce
Ns : the number of samples per bit,
M : MPSK modulation order, e.g., 4, 8, 16, ...
pulse_type : 'rect' , 'rc', 'src' (default 'rect')
alpha : excess bandwidth factor(default 0.25)
MM : single sided pulse duration (default = 6) 

Returns
-------
x : ndarray of the MPSK signal values
b : ndarray of the pulse shape
data : ndarray of the underlying data bits

Notes
-----
Pulse shapes include 'rect' (rectangular), 'rc' (raised cosine), 
'src' (root raised cosine). The actual pulse length is 2*M+1 samples.
This function is used by BPSK_tx in the Case Study article.

Examples
--------
>>> from sk_dsp_comm import digitalcom as dc
>>> import scipy.signal as signal
>>> import matplotlib.pyplot as plt
>>> x,b,data = dc.MPSK_bb(500,10,8,'src',0.35)
>>> # Matched filter received signal x
>>> y = signal.lfilter(b,1,x)
>>> plt.plot(y.real[12*10:],y.imag[12*10:])
>>> plt.xlabel('In-Phase')
>>> plt.ylabel('Quadrature')
>>> plt.axis('equal')
>>> # Sample once per symbol
>>> plt.plot(y.real[12*10::10],y.imag[12*10::10],'r.')
>>> plt.show()