LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mathscript null values in matrix

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?

0 Kudos
Message 1 of 2
(2,244 Views)

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/

Kyle Hartley
Senior Embedded Software Engineer

0 Kudos
Message 2 of 2
(2,224 Views)