Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Discussion Groups

Discussion Groups | Matlab DSP | Help! on ASK, FSK, BPSK demodulation

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Help! on ASK, FSK, BPSK demodulation - hwcl...@gmail.com - Mar 17 18:17:45 2008



Hi, I didn't use the default functions in matlab to plot modulations. I use my own code.
Do you guys have any suggestion how to generate demodulation plot? Do I have to use
"xcorr"? my code are as follow:

h=[1 1 0 1 0 0 1 1 1 0];
bit=[];
for n=1:2:length(h)-1;
            if h(n)==0 & h(n+1)==1
                se=[zeros(1,50) ones(1,50)];
            elseif h(n)==0 & h(n+1)==0
                se=[zeros(1,50) zeros(1,50)];
            elseif h(n)==1 & h(n+1)==0
                se=[ones(1,50) zeros(1,50)];
            elseif h(n)==1 & h(n+1)==1
                se=[ones(1,50) ones(1,50)];
            end
            bit=[bit se];
        end
        plot(bit,'LineWidth',1.5);grid on;
        axis([0 500 -1.5 1.5]);

        fc=30;
        g=handles.bits; 
        n=1;
    while n<=length(g)
        if g(n)==0
            tx=(n-1)*0.1:0.1/100:n*0.1;
            p=(1)*sin(2*pi*fc*tx);
            plot(tx,p,'LineWidth',1.5);grid on;
            hold on;
        else 
            tx=(n-1)*0.1:0.1/100:n*0.1;
            p=(2)*sin(2*pi*fc*tx);
            plot(tx,p,'LineWidth',1.5);grid on;
            hold on;
        end
            n=n+1;
    end


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )