Find coordinates

Input a value and a matrix, and this function will output the row(s) and column(s) of the value.

You are now following this Submission

getcoord(value,matrix)
This function finds the value inside of a matrix containing it. Imput first the value, then the matrix, and the output will be in the form of a vector [r c] with r being the row of the value and c being the column. If the value is present multiple times, the output will be have more rows of [r c]. You can also type in the function in the form getcoord(COORDVAL, MATRIX, RANGEROW, RANGECOL)
where rangerow and rangecol are vectors of integers less than or equal to the dimension of the matrix. This simply finds the value or values in the specified area.

Cite As

Chris Riederer (2026). Find coordinates (https://www.mathworks.com/matlabcentral/fileexchange/8136-find-coordinates), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0