LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to concatenate two arrays of strings and obtain a 2 dimension array result.

Solved!
Go to solution

In the attached vi, there are two examples made with arrays of numbers and strings.

I would like to have the format results for string array as for number array...how can I do it?

 

I mean a 2d array result as for number example...

array result: first column ad, bd, cd, second ae, be, ce and third one cd, ce, cf.

 

Thanks in advance.

0 Kudos
Message 1 of 5
(1,059 Views)
Solution
Accepted by topic author brambo60

Hello,

I tried to apply the same method used for arrays of number to arrays of string but the result is not the expected one.

I mean: having one array of string "a,b,c" and another "e,f,g" I would like to have, as result of concatenation, a 2d array of strings like:

first column: ad bd cd 

2nd column: ae be ce

3rd  column: af  bf  cf

 

How can I modify the attached vi in order to have the wanted result?

 

Thanks in advance.

 

Thanks in advance

 

0 Kudos
Message 2 of 5
(1,006 Views)
Solution
Accepted by topic author brambo60

Hi brambo60,

 

Since you want to iterate each element of the first array with each element of the second array, you need two for loops.

Please find attached the VI and reach out as needed.

For loop.png

afort_0-1664272003672.png

 

Fort

0 Kudos
Message 3 of 5
(1,031 Views)
Solution
Accepted by topic author brambo60

Thanks a lot. I forgot to mention also the tentative I have done with two for loops...but  in mine there was a mistake 

 

Thanks a lot. 

0 Kudos
Message 4 of 5
(1,019 Views)
Solution
Accepted by topic author brambo60

Duplicate post has now been merged

0 Kudos
Message 5 of 5
(990 Views)