Graphics Programs Reference
In-Depth Information
val4 = abs((sin(pi*fd*(n-abs(q))*pri+eps))/(sin(pi*fd*pri+eps)));
x(j,ii)= val3 * val4 / n;
else
x(j,ii) = 0.;
end
end
end
end
Listing 4.8. MATLAB Program Ðfig4_8.mÑ
% Use this program to reproduce Fig. 4.8 o f text
close all
clear all
taup =0.2;
pri=1;
n=5;
x = train_ambg (taup, n, pri);
figure(1)
mesh(x)
xlabel ('Delay - seconds')
ylabel ('Doppler - Hz')
zlabel ('Ambiguity function')
figure(2)
contour(x);
xlabel ('Delay - seconds')
ylabel ('Doppler - Hz')
Listing 4.9. MATLAB Function Ðbarker_ambig.mÑ
function [ambig] = barker_ambig(uinput)
% Compute and plot the ambiguity function for a Barker code
%Compute the ambiguity function
% by utilizing the FFT through combining multiple range cuts
N = size(uinput,2);
tau = N;
Barker_code = uinput;
samp_num = size(Barker_code,2) *10;
n = ceil(log(samp_num) / log(2));
nfft = 2^n;
u(1:nfft) = 0;
j = 0;
for index = 1:10:samp_num
index;
Search WWH ::




Custom Search