How to plot a road that changes shapes and turns into a complete path.

2 ビュー (過去 30 日間)
Harin Chhadva
Harin Chhadva 2021 年 10 月 11 日
回答済み: Shivam Singh 2021 年 10 月 14 日
I have these values that apparently creat a D shaped plot.
I wish to add more shapes to this plot but I don't know the syntax. Please help!
x=[-1:0.01:-0.001,...
cos(pi/2:-0.01:-pi/2),...
-0.001:-0.01:-1+0.001,...
-1*ones(size([-1:0.01:1-0.001]))];
y=[1*ones(size([-1:0.01:-0.001])),...
sin(pi/2:-0.01:-pi/2),...
-1*ones(size([-0.001:-0.01:-1+0.001])),...
[-1:0.01:1-0.001]];

回答 (1 件)

Shivam Singh
Shivam Singh 2021 年 10 月 14 日
Hello Harin,
It is my understanding that you want to know how to add more shapes to the same plot. You can use hold function for retaining current plot when adding new plots.
Hope this helps!

カテゴリ

Help Center および File ExchangePlot Customization についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by