How to plot a function together with a scenario from driving scenario?

2 ビュー (過去 30 日間)
Luan
Luan 2022 年 8 月 3 日
回答済み: Joel 2023 年 9 月 14 日
Hi, I'm currently writing an algorithm that can detect empty parking spaces using ultrasonic sensors, i would like to show graphically the spaces, perhaps with a line green when finding a space and red when it's not, but i don't know how to make this plot together with the scenario or the bird's-Eye plot.

回答 (1 件)

Joel
Joel 2023 年 9 月 14 日
Hello Luan,
I understand you would like to plot a red/green line along with the Driving scenario plot to indicate empty/full driving spaces.
Once the scenario is plotted, you can use "hold on" and then plot a line of required colour. The “hold on” command retains the current plot so that any new plots added do not delete existing plots.
Please refer to the following documentation for more information on “hold on” function: https://in.mathworks.com/help/matlab/ref/hold.html
Hope this helps !
Joel Jacob

カテゴリ

Help Center および File ExchangeAutomated Driving Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by