11-20-2013 06:01 AM
Hello,
I need to concetanate an array with zeros this way: for example, the original array: 123, created array:102030.
I am struggling with this for a long time, because I am a newbie in labview. The solution must be simple, but I can't find it.
Thanks!
Zoli
Solved! Go to Solution.
11-20-2013 06:12 AM
Try the attached VI
11-20-2013 06:18 AM
Thank you, you helped a lot!
11-20-2013 06:20 AM
kudos are all time accepted
11-20-2013 07:15 AM - edited 11-20-2013 07:18 AM
Your "solution" is undeserving of kudos. There is absolutely no need to convert to/from strings to perform this operation.
@borzola wrote:
Hello,
I need to concetanate an array with zeros this way: for example, the original array: 123, created array:102030.
I am struggling with this for a long time, because I am a newbie in labview. The solution must be simple, but I can't find it.
Thanks!
Zoli
That's not concatenation, that's interleaving that you've described.
11-20-2013 07:40 AM
you are right, it's so simple this way!
11-20-2013 07:45 AM - edited 11-20-2013 08:00 AM
@jcarmody wrote:
Your "solution" is undeserving of kudos. There is absolutely no need to convert to/from strings to perform this operation.
That's not concatenation, that's interleaving that you've described.
I agree that the string conversion is silly, but would point out that the option selected for the loop output (right click, Tunnel Mode) uses the NI term "Concatenating".
Never used that feature myself; was curious about the unique looking terminal.
See LV2012 Features and changes. Thanks @tst !
I learned something new today!
11-20-2013 08:01 AM
@PhillipBrooks wrote:
@jcarmody wrote:
That's not concatenation, that's interleaving that you've described.
I agree that the string conversion is silly, but would point out that the option selected for the loop output (right click, Tunnel Mode) uses the NI term "Concatenating".
That *is* concatenating; I was referring to to the OP's use of the term. I replaced the concatenating For loop with an Interleave Array node.
11-20-2013 08:07 AM - edited 11-20-2013 08:07 AM
I was obsessed with the strange for loop output that I missed that. I stand corrected
11-22-2013 01:06 PM
@jcarmody wrote:
Your "solution" is undeserving of kudos. There is absolutely no need to convert to/from strings to perform this operation.
@borzola wrote:
Hello,
I need to concetanate an array with zeros this way: for example, the original array: 123, created array:102030.
I am struggling with this for a long time, because I am a newbie in labview. The solution must be simple, but I can't find it.
Thanks!
Zoli
That's not concatenation, that's interleaving that you've described.
Of course if you want to save a couple scalar buffers (that really don't need to be there) and a bit of real estate.
SIDE NOTE: Smart compiler in 2013! it really only has one of the duplicated array constants allocated.