I start with a matrix which has 10 columns and just one row, and I would like to add a seccond row below that one if the elements in the first row satisfy a certain property, add a third if the elements of the seccond one satisty a certain propery and so on.

Of course, I don't want to lose the elements in any of the rows after inserting a new one.

How do I do this?