MATLAB: How to convert 1D element into 2D element in a matirx

2drow-column index

hi, i need to find the location of elements in a matrix as (row,column) value. what function is used to get the row and column of a element?

Best Answer

Use find function
doc find
Example
A=[1 2 3;4 5 6;7 8 9]
[ii,jj]=find(A)