LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining Elements in 1D array

I have 1D array that in need to combine the elements in specific order.

 

Example:

Elements are arranged like this:

AA

BB

CC

DD

EE

FF

 

Then, I want it to arrange like this:

BBAA

DDCC

FFEE

 

How can i do this?

 

 

0 Kudos
Message 1 of 5
(1,154 Views)

You need to be significantly more specific.

 

Are these array elements strings, integer in hex display, or something else. If the first array is U8 and the second U16, a simple decimate array (two outputs) followed by join numbers would do it. Make sure to consider byte order.

 

If these array elements are strings, you could concatenate the strings.

0 Kudos
Message 2 of 5
(1,127 Views)

Yamaeda_0-1706780247232.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 5
(1,090 Views)

As I already said, here's one (of many!) other interpretation and two different solutions that do the same:

 

altenbach_1-1706802325184.png

 

You really (really!!) need be be significantly more specific! You also need to define what do do with exceptions, for example if the input array has an odd number of elements, the above code versions would drop the extra element.

0 Kudos
Message 4 of 5
(1,071 Views)

Hmmm, I suspect the OP is not being that specific because this is a schoolwork problem. 😉

 

EDIT:  I could be wrong though.  Just noticed he's been around since 2007.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 5 of 5
(1,060 Views)