Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
7 rating:
 1.71 out of 5   

How Do I Create a Blank Entry in a LabVIEW Array?



Primary Software: LabVIEW Development Systems
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I have a data set that contains several blank entries. For example, I would like the data set to look like this:

1 2   4 5
6   8   10

How can I create an empty data point in a LabVIEW array?

Solution:
Besides numeric values, a numeric array in LabVIEW will accept either NaN (Not a Number) or Inf (Infinity). It is also possible to place a negative sign (-) in front of the Inf for negative infinity. You can type the values in by hand or have them programmatically placed into your array.

If you type them by hand, you simply need to type NaN in the array location you wish in leave blank. If you are using a front panel control to enter your array, the table presented above would look like Figure 1 in LabVIEW. Alternatively, you could also use the Build Array to build the same array in the block diagram as seen in Figure 2.


Figure 1. Using NaN in a Numeric Array, Front Panel Control


Figure 2. Using NaN in a Numeric Array, Block Diagram


Related Links:
Tutorial: Arrays and Clusters

Attachments:





Report Date: 07/26/2002
Last Updated: 06/01/2017
Document ID: 2NPCEIMQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit