LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

matrix threshold

i have a real matrix that is composed of positive and negative numbers. I want to remove the values less than zero. In matlab, is the command in simple: m2 = m1<0;, is there such a function in labview 7.0 which would allow me to do this.

thanx
0 Kudos
Message 1 of 2
(2,451 Views)
Hello tombomb,

maybe the attached vi will help you...
I don't know much about MatLab so i suspect a matrix is a two dimensional array and the function you want to have should strip ("physically remove") all numbers below 0. But my vi will do so, but is not perfect. You have to take care of the array dimensions - they will change when you remove elements. And they will be different in every single row/column depending on your data. So maybe you should take a different approach to work with your data, perhaps by replacing unwanted items with a NaN?

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(2,434 Views)