Need help in making line between Point A and 10-Point (1-10), if i have their locations

1 次查看(过去 30 天)
Hi, Need help in making line between Point A and 10-Point (1-10), if i have their locations Reference picture are attach. Figure 1 represent Point A and 10-Point, while Figure 2 represent that i want to make line between Point A and 10-Point.

回答(1 个)

KSSV
KSSV 2018-6-22
编辑:KSSV 2018-6-22
S = [0 0] ;
N = 10 ;
E = rand(N,2) ;
figure
hold on
S = repmat(S,N,1) ;
x = [S(:,1) E(:,1)] ; y = [S(:,2) E(:,2)] ;
plot(x',y')

标签

Community Treasure Hunt

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

Start Hunting!

Translated by