03-08-2012 12:01 PM
Dear Forum members,
Is there a command or method within MathScript of finding the range of rows within a matrix that contain all zeros. Example below shows a (5 x 3) matrix W:
| 1 2 3 |
| 4 5 6 |
| 0 0 0 | = W
| 0 0 0 |
| 0 0 0 |
If I'm doing this by hand or observation in MathScript it can be seen that rows 3 to 5 contain all zeros which can be represented as 3:5 however is there an automatic way of doing this?
03-09-2012 03:35 PM
Bunny,
I'm unaware of a function that does this specifically but you should be able to parse each row and check for all 0s using a set of for loops. Here is a list of all the matrix functions for MathScript node.
http://zone.ni.com/reference/en-XX/help/373123B-01/lvtextmath/msfunc_matrix/