FUNCTION REFERENCE
impixel
Sample image pixels at specified columns and rows.
Sample image pixels at specified columns and rows.
Syntax
P = impixel(I, c, r)Also accepts impixel(X,map,c,r) for indexed images and [c,r,P] outputs. P is a P-by-3 matrix: actual RGB values, repeated grayscale intensities, or indexed colormap rows. Coordinates round to the nearest pixel; outside samples are NaN. Numeric images return double; indexed samples preserve the colormap class. Integer indexed images use zero-based indices, floating indexed images use one-based indices.
Example
impixel(uint8([10 20;30 40]), [1 2], [1 2])Differences from MATLAB: Interactive and world-coordinate forms are not supported; interactive forms return a clear error.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.