www.gusucode.com > phased 案例源码 matlab代码程序 > phased/SimpleIntensityScopeExampleExample.m
%% RTI Display of Moving Target % Use a |phased.IntensityScope| System object(TM) to display the echo intensity % of a moving target as a function of range and time. %% % Run the simulation for 5 seconds at 0.1 second steps. In the display, % each horizontal scan line shows the intensities of radar echo at each time % step. nsteps = 50; dt = .1; timespan = nsteps*dt; %% % Simulate a target at a range of 320.0 km and a range rate of 2.0 km/s. % Echoes are resolved into range bins of 1 km resolution. The % range bins span from 50 to 1000 km. rngres = 1.0; rngmin = 50.0; rngmax = 1000.0; tgtrange = 320.0; rangerate = 2.0; rngscan = [rngmin:rngres:rngmax]; %% % Set up the Intensity Scope using these properties. % % * Use the |XResolution| property to set the width of each scan % line bin to the range resolution of 1 km. % * Use the |XOffset| property to set the value of the lowest range % bin to the minimum range of 50 km. % * Use the |TimeResolution| property to set the value of the scan line time difference % to 0.1 s. % * Use the |TimeSpan| property to set the height of the display window to % the time duration of the simulation. % * Use the |IntensityUnits| property to set the display units to |Watts|. % scope = phased.IntensityScope('Name','IntensityScope Display',... 'Title','Range vs. Time','XLabel','Range (km)',... 'XResolution',rngres,'XOffset',rngmin,... 'TimeResolution',dt,'TimeSpan',timespan, ... 'IntensityUnits','Watts','Position',[100,100,800,450]); %% % Update the current target bin and create entries for two adjacent range % bins. Each call to the |step| method creates a new scan line. for k = 1:nsteps bin = floor((tgtrange - rngmin)/rngres) + 1; scanline = zeros(size(rngscan)); scanline(bin+[-1:1]) = 1; scope(scanline.'); tgtrange = tgtrange + dt*rangerate; pause(.1); end