Coordinate-Element Number Conversion

Converts row, column, dimension to element number & vice versa

You are now following this Submission

coordinate2element_num: Converts row, column & dimension to the element number for the matrix. So row 2, column 3 of a 10X10 is 22.
element_num2coordinate: converts element number 22 of a 10X10 to [2,3]. I only wrote them for up to 3 dimensions. Some one could expand them if they want to.

Cite As

Aman Siddiqi (2026). Coordinate-Element Number Conversion (https://www.mathworks.com/matlabcentral/fileexchange/7377-coordinate-element-number-conversion), 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

small change