Plotting lines on the same graph

1 回表示 (過去 30 日間)
Hasan Al Tarify
Hasan Al Tarify 2021 年 9 月 27 日
回答済み: KSSV 2021 年 9 月 27 日
I am srtuggling with writing a code that plots the graph as shown below. What should I do here to plot the same?

採用された回答

KSSV
KSSV 2021 年 9 月 27 日
x1 = 0 ; y1 = 0 ;
x2 = 1:10 ; y2 = zeros(size(x2)) ;
x3 = zeros(1,10) ; y3 = 1:10 ;
figure
hold on
plot(x1,y1,'-*b') ;
plot(x2,y2,'r') ;
plot(x3,y3,'m') ;
axis([-1 10 -1 10])
legend({'x(t=0)=(0,0,0)','x(t=0)=(1,0,0)','x(t=0)-(0,1,0)'})

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by