The radar auto driving example could not get the result I expected
48 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Xuedong
il 21 Ago 2024 alle 19:03
Commentato: Xuedong
il 22 Ago 2024 alle 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 Commenti
Naga
il 22 Ago 2024 alle 1:40
Did you make any changes to the example model, or did you just run the same model?
Risposta accettata
Jatin Singh
il 22 Ago 2024 alle 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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Detection in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!