Graphics Programs Reference
In-Depth Information
182 MATLAB Simulations for Radar Systems Design
3.12. MATLAB Program and Function Listings
This section presents listings for all MATLAB programs/functions used in
this chapter.
Listing 3.1. MATLAB Program Ðfig3_7.mÑ
% Use this program to reproduce Fig 3.7 from text
clear all
close all
n = 0;
for x = 0:.05:4
n = n+1;
sx(n) = quadl('fresnels',.0,x);
cx(n) = quadl('fresnelc',.0,x);
end
plot(cx)
x=0:.05:4;
plot(x,cx,'k',x,sx,'k--')
grid
xlabel ('x')
ylabel ('Fresnel integrals: C(x); S(x)')
legend('C(x)','S(x)')
Listing 3.2. MATLAB Program Ðfig3_8.mÑ
% Use this program to reproduce Fig. 3.8 o f text
close all
clear all
eps = 0.000001;
%Enter pulsewidth and bandwidth
B = 200.0e6; %200 MHZ bandwidth
T = 10.e-6; %10 micro second pulse;
% Compute alpha
mu = 2. * pi * B / T;
% Determine sampling times
delt = linspace(-T/2., T/2., 10001); % 1 nano second sampling interval
% Compute the complex LFM representation
Ichannal = cos(mu .* delt.^2 / 2.); % Real part
Qchannal = sin(mu .* delt.^2 / 2.); % Imaginary Part
LFM = Ichannal + sqrt(-1) .* Qchannal; % complex signal
%Compute the FFT of the LFM waveform
LFMFFT = fftshift(fft(LFM));
% Plot the real and Imaginary parts and the spectrum
Search WWH ::




Custom Search