    function [sbu, sbl, mf] = SSB( m, fs);
    N = 1048576;% The length of Fast Fourier Transform 
    ts = 1/fs;% Start time
    %t = (0:ts:1);
    t=(0:N-1)/fs;
    fc = 1500; %Carrier frequency 

    % STEP 1
    mh = imag(hilbert(m)); %Hilbert transform of the message signal
    sbu = m.*2.*cos(2*pi*fc*t) - mh.*2.*sin(2*pi*fc*t); %Expression for USB SSB
    sbl = m.*2.*cos(2*pi*fc*t) + mh.*2.*sin(2*pi*fc*t); %Expression for LSB SSB
    
    % STEP2
    SBU = 2/N*abs(fft(sbu)); %Fourier Transform of USB SSB
    SBL = 2/N*abs(fft(sbl)); %Fourier Transform of LSB SSB

    freq = fs * (0 : N/2) / N;
    
    % STEP3
    figure(2)
    subplot(221);
    plot(10*t(1:2000),sbu(1:2000),'r');%Time Domain Plot of USB SSB
    title('Time Domain Representation === USB');
    xlabel('Time'); ylabel('Modulated Signal');
    subplot(222)
    plot(10*t(1:2000),sbl(1:2000),'b');%Time Domain Plot of LSB SSB
    title('Time Domain Representation === LSB');
    xlabel('Time'); ylabel('Modulated Signal');
    
    subplot(223);
    plot(freq(1:50000),SBU(1:50000))
    title('Frequency Domain Representation');
    xlabel('Frequency(Hz)'); ylabel('Spectral Magnitude');
    legend('USB');
    subplot(224)
    plot(freq(1:50000),SBL(1:50000)); %Frequency domain plot
    title('Frequency Domain Representation');
    xlabel('Frequency(Hz)'); ylabel('Spectral Magnitude');
    legend('LSB');
    
    figure(4)
    plot(freq(1:50000),SBU(1:50000),freq(1:50000),SBL(1:50000));
    title('Frequency Domain Representation');
    xlabel('Frequency(Hz)'); ylabel('Spectral Magnitude');
    legend('USB','LSB');
    
    % STEP4, Demodulation:

    md=sbu.*cos(2*pi*fc*t);
    [b,a]=butter(2,0.1);
    mf=filter(b,a,md);
    figure(3)
    plot(t,mf)
    title('Demodulated Signal');
    xlabel('Time'); ylabel('Demodulated Signal');

    figure(1);
    plot(t,m);
    title('Time Domain Representation of Orignal Signal');
    xlabel('Time'); ylabel('Original Signal'); 


