isDone
Syntax
Description
Examples
Run Recorded Radar Scenario
Load prerecorded data from a radar scenario. The data is saved as a struct with the variable name recordedData
. Create a radarScenarioRecording
object using the recorded data.
load recordedRadarScenarioData.mat
recording = radarScenarioRecording(recordedData);
Construct a theater plot to display the recorded data using multiple plotters.
tp = theaterPlot('AxesUnits',["km" "km" "km"], ... 'XLimits',[-50 50]*1e3,'YLimits',[-50 50]*1e3,'ZLimits',[-20 20]*1e3); to = platformPlotter(tp,'DisplayName','Tower','Marker','d'); pp = platformPlotter(tp,'DisplayName','Targets'); dp = detectionPlotter(tp,'DisplayName','Detections','MarkerFaceColor','black'); cp = coveragePlotter(tp,'DisplayName','Radar Beam'); coverage = struct('Index',1,'LookAngle',[0;-7],'FieldOfView',[1;10], ... 'ScanLimits',[0 365;-12 -2],'Range',100e3,'Position',[0;0;-15], ... 'Orientation',eye(3));
Run the recorded scenario and animate the results.
scanBuffer = {}; while ~isDone(recording) % Step the reader to read the next frame of data [simTime,poses,covcon,dets,senconfig] = read(recording); scanBuffer = [scanBuffer;dets]; %#ok<AGROW> plotPlatform(to,poses(1).Position); plotPlatform(pp,reshape([poses(2:4).Position]',3,[])'); plotCoverage(cp,covcon); if ~isempty(dets) plotDetection(dp,cell2mat(cellfun(@(c) c.Measurement(:)', scanBuffer, 'UniformOutput', false))); end % Clear the buffer when a 360 degree scan is complete if senconfig.IsScanDone scanBuffer = {}; dp.clearData; end end
Input Arguments
recording
— Radar scenario recording
radarScenarioRecording
object
Radar scenario recording, specified as a radarScenarioRecording
object.
Output Arguments
tf
— Recording has reached the end
true
| false
Recording has reached the end, returned as true
or
false
.
Version History
Introduced in R2021a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)