I have a matrix A = [ 3 4 ; 1 3; 5 6] I need to find the value beside 4. I tried find() function which returns (row, column) indices of 4, I need to calculate 3 from that indices. Is there any direct way to tell 3 is the neighbor element of 4?
MATLAB: Find other element in row of a matrix
findmatrix element
Related Question
- Position of element in a row
- How to replace half the number of specific element in an array
- Rebuild a matrix from indices
- How to add four neighbor elements (left, right, top and bottom) of each element of a given matrix and make a new matrix of the same sixe from the calulated values
- Selecting elements in the matrix
- Find indices of one array in another array.
- Finding all indices of a value in matrix
Best Answer