The radar auto driving example could not get the result I expected
48 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Xuedong
el 21 de Ag. de 2024 a las 19:03
Comentada: Xuedong
el 22 de Ag. de 2024 a las 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 comentarios
Naga
el 22 de Ag. de 2024 a las 1:40
Did you make any changes to the example model, or did you just run the same model?
Respuesta aceptada
Jatin Singh
el 22 de Ag. de 2024 a las 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Detection en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!