07-12-2014 01:15 AM
For an example 1d array [1,2,3,4,5,6], how to duplicate each element 5 times for instance, to generate a new 1d array as [1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6]?
Solved! Go to Solution.
07-12-2014 01:49 AM
This seems trivial. What have you tried so far? What is your LabVIEW version?
07-12-2014 02:02 AM
I'll give you the tip you build your own logic.
If you have 2013 version:
For loop and Initialize array
If you have the earlier version:
For loop, Initialize array and shift register
07-14-2014 02:19 PM
Hi findout,
that is a question that you can solve by reading some free tutorials, but I am going to show you a very simple example of how you can do it (if your LV version supports the auto-indexing).
Hope it helps, regards!
07-14-2014 03:51 PM
@Luis32 wrote:
... show you a very simple example of how you can do it (if your LV version supports the auto-indexing).
All LabVIEW version support auto-indexing. Older version don't support he concatenating output tunnel you are using.
Also, the "replicas" control belongs outside the loops, it should not change during exection.
07-14-2014 06:35 PM
Thanks. I created a similar VI with additional Reshape Array function to convert the output into a 1d array.