10-21-2013 05:56 AM - edited 10-21-2013 05:57 AM
How can I inverse the Split 1D Array by recombining the splitting array? i.e I have two boolean arrays A and B, and I want them in one boolean array: A array elements followed by B elements (NOT Interleaving)
Thank you
Solved! Go to Solution.
10-21-2013 06:13 AM
Hello ysma,
You can use the "Build Array" function from the Array pallet. The function has two option to connect the inputs. One makes a 2D Array out of the inputs an the other one connects the inputs and it is still an 1D Array.
I hope that helps you.
10-21-2013 06:24 AM
This input mode is switched by right clicking the Build Array primitive, right clicking, and selecting Concatenate Inputs:
10-23-2013 02:16 AM - edited 10-23-2013 02:23 AM
What I want to do is making encapsulation for a random packet (group of logic bits ones annd zeros) like a network packet by entering my data with IP address, both are in decimal numbers, then I turned both of them to a boolean array, after that I want to make a packet datagram by putting IP data as a header followed by my data.
When I did this, Build Array added just first bit for both entries, and when I marked on Concantenate Inputs, it added ony the first array.
It can be done easily by decimal numbers, but boolean? Did I miss something?
See attached vi file
10-23-2013 02:38 AM
10-23-2013 02:46 AM - edited 10-23-2013 02:48 AM
If you want the appearance of concatenating Boolean arrays in the manner that you describe, I believe you can also logical shift the numeric value for array B and then adding the numeric values of A and B together. Something similar to this:
10-23-2013 02:52 AM
Also, on second thoughts, if you're converting a number to a Boolean array, the resultant array is either 8, 16, 32 or 64 elements long depending on the numeric being converted.
So if you're concatenating A (32-bit integer to Boolean array) to B (32-bit integer to Boolean array) it may take some scrolling through elements to see the elements from array B 🙂
10-23-2013 02:57 AM - edited 10-23-2013 02:58 AM
Thank you Marcus_Körner , GerdW and thoult for your assistance.
Sorry I am using Labview 2013, so I saved it in ver 2010 format, and I uploaded a photo for the circuit.
10-23-2013 03:04 AM - edited 10-23-2013 03:08 AM
Hi ysma,
- you cannot convert SGL data directly to boolean array as the red CoercionDot is showing you...
- you still don't concatenate the arrays (despite all the comments in this thread) but instead create a 2D array...
Try this:
10-23-2013 03:53 AM - edited 10-23-2013 03:54 AM
Thank all of you indeed