Contents
Barker code length 11 and matched filter impulse response b[11-n]
b = [1,1,1,-1,-1,-1,1,-1,-1,1,-1];
h = fliplr(b);
matched filtering
y = conv(h,b);
Graphics
figure('Name',['Barker code with length N = ',num2str(length(b))],'NumberTitle','off');
subplot(1,3,1); stem(0:length(b)-1,b,'filled'); grid
axis([0,length(b)-1,-2,2]); xlabel('n \rightarrow'); ylabel('b[n] \rightarrow')
subplot(1,3,2); stem(0:length(b)-1,h,'filled'); grid
axis([0,length(b)-1,-2,2]); xlabel('n \rightarrow'); ylabel('h[n] \rightarrow')
subplot(1,3,3); stem(0:length(y)-1,y,'filled'); grid
axis([0,length(y)-1,-2,12])
xlabel('n \rightarrow'); ylabel('y[n] \rightarrow')