Code covered by the BSD License  

Highlights from
IQ Baseband Builder

image thumbnail

IQ Baseband Builder


Neil Forcier


26 Sep 2012 (Updated )

This application allows you to generate IQ baseband signals for the Agilent 33522A, 33522B, 33512B

rootRaisedCosineFilter(yData, nSamples, fOrder, rOff,plot)
function y = rootRaisedCosineFilter(yData, nSamples, fOrder, rOff,plot)
%this function applies root raised cosine filtering or pulse shaping to the
%input symbol data. It also sets a sample count for a given symbol
%yData --> input symbol data
%nSamples --> number of samples per pulse
%fOrder --> filter order, must be an even number
%fOff --> roll off factor, must be between 0 and 1
%plot is used as a bool to show plot or not

%make sure roll off is within 0 to 1 if not set to .25 
if rOff > 1 || rOff < 0
    rOff = 0.25;

%create filter definition
filtDef = fdesign.pulseshaping(nSamples, 'Square Root Raised Cosine','Nsym,Beta', fOrder, rOff);
rrcFilter = design(filtDef);
rrcFilter.Numerator = rrcFilter.Numerator * sqrt(nSamples);

% Plot impulse response.
if plot == 1.0
    fvtool(rrcFilter, 'impulse')

% Upsample and apply raised cosine filter.
yUp = upsample(yData, nSamples);
y = filter(rrcFilter, yUp);

Contact us