Modulate

What's wrong with my M-ary ASK modulation demodulation MATLAB code?
How to demodulate PSK in Matlab?How to modulate a signal in Matlab? How to demodulate PSK in Matlab?z = pskdemod( y , M ) demodulates the input M-PS...