MATLAB: How can i create only the Matrix index

MATLABmatrixmatrix arrayPhased Array System Toolbox

Hi i would like to create two variable that represent the matrix index of any size of matrix for example if i have matrix
A=[(1,1) (1,2) (1,3);(2,1) (2,2) (2,3);(3,1) (3,2) (3,3)]
how can i create like the matrix A
thank you

Best Answer

The easiest way is
sparse(list_of_row_indices, list_of_corresponding_column_indices, list_of_corresponding_values)
You can full() the result afterwards.