取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 5 条)
2,708 次查看

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 项奖励
2 条消息(共 5 条)
2,681 次查看

Yamaeda_0-1706780247232.png

 

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

Qestit Systems
Certified-LabVIEW-Developer
0 项奖励
3 条消息(共 5 条)
2,644 次查看

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 项奖励
4 条消息(共 5 条)
2,625 次查看

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 项奖励
5 条消息(共 5 条)
2,614 次查看