MATLAB: I am trying to define a point in a matrix as(Rows, columns). I want to store the columns and rows of Matrix(k) as (i,j)

matrix

What I mean is, Matrix= [1,2,3;4,5,6;7,8,9]. input=Matrix(5) output(i,j)=(2,2)

Best Answer

Based on the updated info, I think you need the ind2sub command.