Hi guys,
I have in total 360 points. I want to draw line between specific points based on my data by having their length. For example, based on my Excel sheet all points from coloum A connect to coloum B and Coloum C is thier length (distance between these points).
How can I plot these lines?
Thanks in advance,

3 件のコメント

KSSV
KSSV 2018 年 6 月 25 日
If you have two points A nd B, why you need length again? YOu can straigh away use plot eh.
Rozanna Pas
Rozanna Pas 2018 年 6 月 25 日
No I dont have just 2 points. Actually, these are data of a pipe network. I know the length of pipe and nodes id (upstream and downstream point). That means, I have not connection between all of points.
Below is example of 3 point from total 360 points. us_node_id (coloum A in matlab data file) : [point 1,point 5, point 6]
ds_node_id (colom B in matlab data file) :[point 5, point 6, point10]
Length of line (coloum C in matlab data file):[ 12,24,22]
Rozanna Pas
Rozanna Pas 2018 年 6 月 25 日
Here is data!:)

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

 採用された回答

Nithin Banka
Nithin Banka 2018 年 6 月 25 日
編集済み: Nithin Banka 2018 年 6 月 25 日

0 投票

from what I have understood, you want to plot different line segments connecting points from your data. I took an example to explain you how to do it.
data = rand(360, 4); %random 360 point pairs with x-coordinates as column 1 and 2, y-coordinates as column 3 and 4
hold on;
for i=1:360
plot(data(i, 1:2), data(i, 3:4));
end

1 件のコメント

Rozanna Pas
Rozanna Pas 2018 年 6 月 25 日
How can I plot by length of the points? I have just 2 coloums; Point from coloum 1 links to point to coloum 2.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by