function [I,Q] = IQsignals(x,L, pulso)
%------------------------------------------------------------------------
%| function IQsignals(x, L, SNR, pulso)
%------------------------------------------------------------------------
%|
%| Create IQ signals for QPSK modulation
%|
%| Parametros de Entrada:
%| 1.- X = bit secuence as row vector.
%| Restrictions: length(X) even => length(X) = 2*k
%| 2.- L = samples per bit
%| 3.- PULSO = flag, 0= square signal,
%| 1= raise cosine signal (Roll Off= 0.6)
%|
%| Salidas:
%| 1.- I = in Phase
%| 2.- Q = in Quadrature
%|
%| NOTA: Communication and Signal Toolboxes required
%|
%-------------------------------------------------------------------------
%| Autor: Cesar Delgado
%| Fecha: 19-Abril-2.004
%-------------------------------------------------------------------------
% 1.- Converting to "1", "-1" secuence
%--------------------------------------
x = 2*x-ones(1,length(x));
% 2.- Squere signals generation
%-------------------------------
I = SquareGen(x(1:2:length(x)),L);
Q = SquareGen(x(2:2:length(x)),L);
% 2.- Raise cosine filtering
%---------------------------
if ~pulso,
h = rcosfir(0.6,[-3 3],L,1);
I = filter (h,1,I);
Q = filter (h,1,Q);
end;
I = I./max(I);
Q = Q./max(Q);