12-22-2008 05:08 PM
Hello,
I am trying to create a numeric array indicator that contains blank fields for all the odd indexes. For example, (i= 1, 3, 5, etc...) Right now I have a case structure to determine if the index is even or odd. For an even index, I pass in the appropriate values into the "Insert into Array" function. For the odd index, I am unsure of what to wire to the "new elements/subarray" connector pane to generate a un-intialized value. Right now, I am wiring the infinite constant to use as an example. Ideally I want the field to be blank. Thanks for the help!
Solved! Go to Solution.
12-22-2008 06:20 PM
There is a function under the array palette called 'Interleave 1D Arrays'.
If you take your array, then interleave an array of all 0's, this should do the trick.
12-22-2008 06:31 PM
hello,
i can't think you can have uninitialised value in filled array ,but zero,
if you don't want any caractere and use string array for displaying as you want, see pict:
12-22-2008 08:04 PM - edited 12-22-2008 08:05 PM
A numeric cannot be blank.
If it is just an indicator, you would just substitute a string instead. It can be made to look the same. Here's one code possibility.

Of course if half of the elements are always the same (blank), it does not provide any useful information to the operator. You might as well just display the even elements without any gaps. This saves you FP space.
12-22-2008 09:36 PM
Given that there is no such thing as a "blank" number the real question is, "What do you want the behavior of the odd-numbered fields to be?" Is there going to be some math done on all the elements of the array? Will they be later replaced with real data? We need some more details concerning what you are trying to accomplish.
Mike...
12-23-2008 05:45 AM
If the blank value you desire is for display purposes only, then you would use the convert to string examples already given.
If you want to pass the array to a subvi or return it to a calling vi for additional processing, you might want to replace Inf with the special flotaing point value NaN.
12-23-2008 01:01 PM
12-23-2008 01:46 PM