The radar auto driving example could not get the result I expected
48 views (last 30 days)
Show older comments
Xuedong
on 21 Aug 2024 at 19:03
Commented: Xuedong
on 22 Aug 2024 at 16:10
Hi, experts,
I am using R2024a and trying to run the example of AutomatedDrivingRadarSimulationExample by running the two commands below in the Command Window of matlab:
>> openExample('driving_radar/AutomatedDrivingRadarSimulationExample')
>> AutomatedDrivingRadarSimulationExample
After running the example, I observed a plot (see SNRplot.png attached), but could not see the radar image (see RadarImage.png attached) which I expected. Any expert knows if I missed anything? How should I do (Do I need to modify matlab script in the example), in order to see the radar image (RadarImage.png attached)?
Running the attached matlab code got the same result: you can see a SNR plot, but not the radar images.
Many thanks!
2 Comments
Naga
on 22 Aug 2024 at 1:40
Did you make any changes to the example model, or did you just run the same model?
Accepted Answer
Jatin Singh
on 22 Aug 2024 at 13:50
You are correct that two figures are generated as part of the example, but on running the model you can only see the SNR plot and not the Radar Image.
This happens because the code is intended to run that way.
If you take a look at the “helperAutoDrivingRadarSigProc.m” file and scroll down to the definition of function “publishSnapshot” shown in the image below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1757954/image.png)
As suggested by the comments, the function intentionally closes the figure after using the “snapnow” command which takes the snapshot of the image for inclusion in the live script output.
As a workaround, if you want both figures to appear in separate figure windows, kindly go on and comment the line where function “close” is called.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1757959/image.png)
Saving the function and running the script again will give you the desired results.
More Answers (0)
See Also
Categories
Find more on Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!