I got a matrix of the form:
1.0 2.0 3.0 4.0
1 0 0 0 1
2 0 0 1 0
3 1 0 0 0
4 0 1 0 0
5 1 0 0 0
6 0 0 0 0
7 1 0 0 0
I want to add another column in the matrix where its value will be 1 only if every other value is 0 and 0 otherwise. So visually i want this:
1.0 2.0 3.0 4.0 5.0
1 0 0 0 1 0
2 0 0 1 0 0
3 1 0 0 0 0
4 0 1 0 0 0
5 1 0 0 0 0
6 0 0 0 0 1
7 1 0 0 0 0