www.gusucode.com > phased 案例源码 matlab代码程序 > phased/AmbiguityFunctionOfARectangularPulseExample.m

    %% Plot Ambiguity Function of Rectangular Pulse
% Plot the ambiguity function magnitude of a rectangular pulse.

% Copyright 2015 The MathWorks, Inc.

hrect = phased.RectangularWaveform;
x = step(hrect);
PRF = 2e4;
[afmag,delay,doppler] = ambgfun(x,hrect.SampleRate,PRF);
contour(delay,doppler,afmag);
xlabel('Delay (seconds)'); ylabel('Doppler Shift (hertz)');