Dear Mata users,
I'm trying to drop a matrix row (or column, the matrix being symmetric), or at least not counting it in the row() function.
E.g :
Consider the following matrix
The row function counts 4 rows. However the last one is empty.
I'd like in this case to return "3", i.e. the number of non empty rows.
How could I do that?
Best,
Charlie
I'm trying to drop a matrix row (or column, the matrix being symmetric), or at least not counting it in the row() function.
E.g :
Consider the following matrix
Code:
mata M=(0,4,0,0\ 4,0,2,0\ 0,2,0,0\ 0,0,0,0) r=rows(M) r
I'd like in this case to return "3", i.e. the number of non empty rows.
How could I do that?
Best,
Charlie
Comment