The radar auto driving example could not get the result I expected
48 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Naga
2024 年 8 月 22 日 1:40
Did you make any changes to the example model, or did you just run the same model?
採用された回答
Jatin Singh
2024 年 8 月 22 日 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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Detection についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!