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