From: ravi gtg on
Hello guys, I'd like some help,

If I have a matrix A:

A = [ 0 0 0 0 0;
0 0 0 0 2;
0 2 0 0 0;
0 0 0 0 0 ]


now, the number 2 starts at column 2 and ends at column 5

also, the number 2 starts at row 2 and ends at row 3.


So, I want to output a matrix with these starting and ending values in the following format:

[ starting_row starting_column ending_row ending_column]


So, for example, for matrix A, I'd like to get:

[ 2 2 3 5]

How can I do this?

Thanks
ravi