File Exchange

image thumbnail

connect two pixels

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

2 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 .

Comments and Ratings (6)

Eric Printz

works very nice! - saved me some time :)

Josch Hanib

Excellent Program. Simple and works great!

Egor Reentov

It works, just one minor problem... File is called linept.m, and function is linept2. So it does not work unless you rename one of them to match the other.

Anoop Sadani

does n't work really well

BJ Weber

Nice program

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!