필터 지우기
필터 지우기

rectangle intersect with line and display which line or point got intersect?

조회 수: 1 (최근 30일)
Prakash Choudhary
Prakash Choudhary 2019년 6월 4일
댓글: Adam Danz 2019년 6월 5일
Dwy0 = 200;
Dwy = 100;
B1x = data(:,2);
B2x = data(:,2)+4*7.*D;
B3x = data(:,2)+4*7.*D;
B4x = data(:,2);
B1y = data(:,3) + (D/2);
B2y = data(:,3) + (Dwy/2);
B3y = data(:,3) - (Dwy/2);
B4y = data(:,3) - (D/2);
xv = [B3x,B4x,B1x,B2x];
yv = [B3y,B4y,B1y,B2y];
x2v = [B4x B1x];
y2v = [B4y B1y];
AA=intersect([xv,yv],[x2v,y2v])
plot(AA,'b.')
hold on;grid on
plot(xv,yv,'.')
% plot(x2v,y2v)
  댓글 수: 20
Prakash Choudhary
Prakash Choudhary 2019년 6월 5일
is it possible to chat with you through email?
Adam Danz
Adam Danz 2019년 6월 5일
The solution probably isn't that complicated. You have to find the x value of the vertical lines; then, given that x value, find the y value on the blue line (interpolate if needed). The solution probably would have taken less time to write than the time spent going back and forth trying to understand your data. There has already been 20 comments on this and still, no data. We could exchange comments for the next few months and I still won't be able to help until you attach some data for me to work with.
You already produced a figure. That's impossible to do without data. So you have the data. You just need to save it to a mat file and attach it. Unfortunately I have other obligations today but I might have time to help you later (if there are data to work with).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Elementary Polygons에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by