Intersects
It finds intersect points between lines using arithmetic geometry formulas. to find all intersects run it like following;
here, x1,x2,x3,x4 are defined as;
x1=rand(1,100); y1=rand(1,100); x2=rand(1,100); y2=rand(1,100);
x=[];
y=[];
tic
for i = 1:100
x2a = circshift(x2,i);
y2a = circshift(y2,i);
[xa,ya]=Intersects(x1,y1,x2a,y2a);
x=[x,xa];
y=[y,ya];
end
toc
plot(x1,y1,'g',x2,y2,'b',x,y,'ko'),
Cite As
Mustafa Codur (2024). Intersects (https://www.mathworks.com/matlabcentral/fileexchange/80701-intersects), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |