LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dublicate array elements

Solved!
Go to solution

Hallo,

 

I can't really explain my problem, but my example normally will be clear..

(I have a random size array: 4-4, 10-3,... and random values)

 

 

Thanks for you help!

 

in:

1   2   3   4

5   6   7   8

9  10  11  12

 

out:

1   1   2   2   3   3   4   4

5   5   6   6   7   7   8   8

9   9   10 10  11 11 12  12

 

0 Kudos
Message 1 of 7
(2,621 Views)

Is your array always 2 dimensions?  What have you tried so far?  I think you can do this with an auto-indexing for loop and the "Interleave 1D Arrays" function.  Give it a try, and post your code if you need more help.

Message 2 of 7
(2,619 Views)
Solution
Accepted by koekie

317.PNG

Indeed Nathand


"Should be" isn't "Is" -Jay
Message 3 of 7
(2,615 Views)

Great, this does the job very well..

Now for doing te same but vertically, can i use the transpose array function before the interleave function so i copy in the y dimension as well as the x dimension?

0 Kudos
Message 4 of 7
(2,607 Views)

Just as copying each row so my array also expand down as he expanded horizontally.

 

0 Kudos
Message 5 of 7
(2,605 Views)

Alright I got my solution!


Thanks for helping!

0 Kudos
Message 6 of 7
(2,600 Views)

Since Jeff or Nathan were the ones who gave you the solution based on the problem you originally proposed, I think you owe them by marking one of their responses as the solution rather than marking your own final result which is clearly based on the ideas they gave you.  First you will have to go to the options menu to the upper right of your message to unmark it as the solution.

 

At least give them some credit by giving their posts a  kudo.

Message 7 of 7
(2,577 Views)