image thumbnail

connect two pixels

version 1.0.0.0 (586 Bytes) by Cubas Georges
Connect two pixels in a matrice/image.

3.1K 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 (2021). 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

Community Treasure Hunt

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

Start Hunting!