Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I'm having trouble drawing lines.

1 回表示 (過去 30 日間)
Muhendisleksi
Muhendisleksi 2017 年 9 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
There are two lines from 102 to 103 but they do not appear;
Z =
1.0e+03 *
0.102000000000000 0.164526000000000 7.849474000000000
0.103000000000000 0.608285000000000 7.731373000000000
0.107000000000000 0.719676000000000 7.969948000000001
0.108000000000000 0.342243000000000 8.404159999999999
kord =
1.0e+03 *
0.102000000000000 0.164526000000000 7.849474000000000
0.108000000000000 0.342243000000000 8.404159999999999
0.102000000000000 0.164526000000000 7.849474000000000
0.107000000000000 0.719676000000000 7.969948000000001
0.102000000000000 0.164526000000000 7.849474000000000
0.103000000000000 0.608285000000000 7.731373000000000
kork =
1.0e+03 *
0.102000000000000 0.164526000000000 7.849474000000000
0.103000000000000 0.608285000000000 7.731373000000000
0.103000000000000 0.608285000000000 7.731373000000000
0.107000000000000 0.719676000000000 7.969948000000001
0.107000000000000 0.719676000000000 7.969948000000001
0.108000000000000 0.342243000000000 8.404159999999999
for i=1:2:length(kord)-1
dline=line([kord(i,2),kord(i+1,2)],[kord(i,3),kord(i+1,3)],'LineStyle','--','Color','b');
end
for i=1:2:length(kork)-1
kline=line([kork(i,2),kork(i+1,2)],[kork(i,3),kork(i+1,3)],'Color','r','LineWidth',0.5);
end
  3 件のコメント
Muhendisleksi
Muhendisleksi 2017 年 9 月 9 日
no, 103 and 102 are columns of another matrix.
Muhendisleksi
Muhendisleksi 2017 年 9 月 9 日
the blue line is beneath the red line.

回答 (1 件)

David Goodmanson
David Goodmanson 2017 年 9 月 9 日
編集済み: David Goodmanson 2017 年 9 月 9 日
Hi Muhendisleksi,
A couple of options. If you swap the for loops around so as to plot the dashed blue lines second, then you can see both lines. Another option is, after creating kork, add the line kork = kork+2 for example. That is not strictly correct of course but it puts the two lines side by side and does not affect the look of the plot otherwise.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by