Hi there,
I am trying to plot those numbers below but i need to associate them. For example I want the line coming from 0.04 and so on.
But the problem this plot them from 0.
Plot([0.04 70],'-.r*')
hold on
plot( [ 0.06 146 ],'--mo')
hold on
plot([ 0.05 161],':bs')
hold on
plot([ 0.07 193],'-.r*')
hold on
plot([0.08 197],'--mo')
hold off

1 件のコメント

Brave A
Brave A 2021 年 2 月 5 日
Any suggestions?

サインインしてコメントする。

 採用された回答

KSSV
KSSV 2021 年 2 月 5 日

0 投票

P = [0.04 70 ; 0.06 146 ; 0.05 161 ; 0.07 193 ; 0.08 197] ;
plot(P(:,1),P(:,2))

6 件のコメント

Brave A
Brave A 2021 年 2 月 5 日
I don't want them in one line. I need different lines
KSSV
KSSV 2021 年 2 月 5 日
The code you gave plots in different lines right?
Brave A
Brave A 2021 年 2 月 5 日
yes but it's not associated them
KSSV
KSSV 2021 年 2 月 5 日
What do you mean by associating?
Brave A
Brave A 2021 年 2 月 5 日
I need like your code but each them in line.
KSSV
KSSV 2021 年 2 月 5 日
P = [0.04 70 ; 0.06 146 ; 0.05 161 ; 0.07 193 ; 0.08 197] ;
[m,n] = size(P) ;
for i = 1:m-1
plot(P(i:i+1,1),P(i:i+1,2))
hold on
end

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2021 年 2 月 5 日

コメント済み:

2021 年 2 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by