www.gusucode.com > phased 案例源码 matlab代码程序 > phased/AmbiguityFunctionOfLinearFMWaveformExample.m
%% Ambiguity Function of Linear FM Waveform % This example shows how to plot the ambiguity function of a linear FM % pulse waveform. %% % *Note:* This example runs only in R2016b or later. If you are using an earlier % release, replace each call to the function with the equivalent |step| % syntax. For example, replace |myObject(x)| with |step(myObject,x)|. %% % Define and set up the linear FM waveform. waveform = phased.LinearFMWaveform('PulseWidth',100e-6,... 'SweepBandwidth',2e5,'PRF',1e3); %% % Generate samples of the waveform. wav = waveform(); %% % Create a 3-D surface plot of the ambiguity function for the waveform. [afmag_lfm,delay_lfm,doppler_lfm] = ambgfun(wav,... waveform.SampleRate,waveform.PRF); surf(delay_lfm*1e6,doppler_lfm/1e3,afmag_lfm,... 'LineStyle','none') axis tight grid on view([140,35]) colorbar xlabel('Delay \tau (\mus)') ylabel('Doppler f_d (kHz)') title('Linear FM Pulse Waveform Ambiguity Function') %% % The surface has a narrow ridge that is slightly tilted. The tilt % indicates better resolution in the zero delay cut.