Not a Number (NaN) is given when trying to perform calculations on part of an array that is not initialised. For example, if you have the following array:
If you have an array that has elements that are NaN and you would like to remove them so that you can perform operations such as finding the mean or standard deviation of a column or row then you can remove these elements and replace them with zeros by using the 'Not a Number/ Path/ Refnum?' function. The following code will remove any cases of NaN and replace them with zeros:
In general, if you find NaN appearing in arrays or as results of functions, take a look at the data you are trying to read or manipulate.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful
How Do I Create a Blank Entry in a LabVIEW Array
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.