フィルターのクリア

Compute intersection between lines

2 ビュー (過去 30 日間)
sparsh garg
sparsh garg 2021 年 9 月 25 日
編集済み: Walter Roberson 2021 年 9 月 25 日
Le't say I have 2 matrices that represent lines
Let's say you have A a 16x2 matrix that represents one set of lines shown below
And then there is B a 12x2 matrix representing another set of lines shown below
I know interx can be used to find intersection between lines,curves etc. but what i want to do is take the first line of A and find its intersection with the last line of B
similarly second line of A intersects with second last line of B
As of now this is what i came up with
for i=1:2:size(L_seg_proj,1)
L1=L_seg_proj(i:i+1,:);
for j=1:2:size(R_seg_proj,1)
L2=R_seg_proj(j:j+1,:);
P=InterX(L1,L2);
end
end
But the issue with this is that for every line in L_seg_proj(L1) it computes intersection between L1 and all the lines in R_seg_proj.
Any ideas on what I can do to rectify this?
  1 件のコメント
sparsh garg
sparsh garg 2021 年 9 月 25 日
編集済み: Walter Roberson 2021 年 9 月 25 日

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by