connect two pixels

Connect two pixels in a matrice/image.
3.2K Downloads
Updated 17 May 2004

No License

I think the created line is the most sort as it can be but if not tell me yours ideas :)

Command line
------------
result=linept2(matrice, X1, Y1, X2, Y2)
matrice : matrice where I'll write
(X1, Y1), (X2, Y2) : points to connect
result : matrix + the line

Note
----
matrice can contents anything
(X1, Y1), (X2, Y2) can be out of the matrice

Example
-------
a = linept(zeros(5, 10), 2, 2, 3, 9)
a =
0 0 0 0 0 0 0 0 0 0
0 1 1 1 1 0 0 0 0 0
0 0 0 0 0 1 1 1 1 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

Cite As

Cubas Georges (2024). connect two pixels (https://www.mathworks.com/matlabcentral/fileexchange/4177-connect-two-pixels), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Shifting and Sorting Matrices in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

the fonction's name is corrected :)