No BSD License  

Highlights from
BPSK Simulator for Low Rate Transmisions

image thumbnail

BPSK Simulator for Low Rate Transmisions

by

 

01 Jun 2004 (Updated )

BPSK Simulator for didactical purposes. Systemic coding style.

SquareGen (IN, L)
function PAM = SquareGen (IN, L)
%------------------------------------------------------------------------
%  function PAM = SquareGen (IN, L)
%------------------------------------------------------------------------
%     This function create an square signal for a bit secuence
%   
%    Entradas:
%       1.- IN = row vector of "0" and "1"
%       2.- L  = Samples per bit
%
%    Salida:
%       1.- PAM =  TTL signal
%-------------------------------------------------------------------------
%   Autor: Cesar Delgado
%   Fecha: 19-Abril-2.004
%-------------------------------------------------------------------------

if nargin < 1
    disp('ERROR: minimo un parametro de entrada en la funcion GeneraPAM');         
else
    if nargin < 2   
         L = 10;           
    end;        

    % 1.- Interpolacion
    %-------------------
    inter(1:L:L*length(IN)) = IN;
    
    % 2.- Determinacion de la PAM
    %----------------------------
    h   = ones(1,L); 
    PAM = conv(inter,h);     
end;

Contact us