LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

If statements in LabView MathScript Node / general syntax

Hi all,
 
I am just now starting use LabView and I am currently trying to execute some code in a MathScript node. My MathScript node takes in two inputs which are inputted by a numerical control from the user and then it outputs a value to the numeric indicator.

However, in my MathScript node I wanted to use an if statement to see if a variable (defined to be an empty array) is empty or if a value has been stored in it already and I wasn't sure if you can do this type of coding in a MathScript node?
 
Any help is greatly appreciated! 🙂 Thanks!
0 Kudos
Message 1 of 2
(6,911 Views)
Hi dtria,

I think the isempty function might do what you want. It returns true if its input is an empty array and false otherwise.

An example usage from the LabVIEW help is as follows:
A = [1, 2, 3; nan, inf, 4]
C = isempty(A)

Will this work for you?

jattas
LabVIEW Math & Signal Processing
0 Kudos
Message 2 of 2
(6,907 Views)