LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create list of combinations

Hello,

 

I'm trying to create a list of all possible combinations of 1 array (2D). I have 3 elements/row:

 

Array:

a   b  c

1   2  3

A  B  C

*   +  {

 

Result:

a  a  a  a  a  ...

1  1  1  1  1  ...

A A  A  B B ...

*  +  {   *   + ...

 

Any idea?

 

Thank you.

 

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

Test size of each dimension and use the rotate array primitive.

 

Have fun!


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 5
(2,481 Views)

hmm, maybe rotate is not the best idea.. here's a quick throw in for if you have just 2 sets of characters, hope it inspires you.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 3 of 5
(2,474 Views)

thank you,

 

0 Kudos
Message 4 of 5
(2,471 Views)

By the way, if you want to be able to handle any number sets of chars, you will have to create a recursive algorithm, I think.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 5
(2,467 Views)