04-24-2017 05:07 PM
Dear friends,
As new user of lab view, I am struggling with this challenge
it would be very difficult for me to explain it and I try to make it clear by an example
array : 2 3 4 5
iteration: 3 2 1 2
out put: 2 2 2 3 3 4 55
my VI is only working for the first element
Solved! Go to Solution.
04-24-2017 05:12 PM - edited 04-24-2017 05:17 PM
Step back, write down on a piece of paper how you do this. Think in terms of loops and iterations.
Some useful functions would initialize array, and also using concatenating tunnels on loops.
Insert into Array should not be used at all in your solution.
04-24-2017 05:34 PM
I have done all you told me, it seems the solution of this challenge is beyond my knowledge and I have spent more than 5 hours to solve it.
I am not that kind of guy to ask too instead of trying.
04-24-2017 05:54 PM
Is this a class assignment?
04-24-2017 06:06 PM
of course NO
04-24-2017 06:41 PM - edited 04-24-2017 06:44 PM
Okay then.
It had the smell of homework, and we don't want to do people's homework for them.
Still, you'll learn more if you can figure it out yourself.
I'll give you some tips. It is a simple VI and I'll tell you exactly what elements you need in there.
1. 2 controls that are your 2 1-D arrays for the inputs
2. 1 indicator that is your 1-D array output.
3. 1 For Loop
4. 1 Initialize Array
5. Auto-index input tunnels
6. Concatenating output tunnel.
That is all you need.
04-25-2017 01:00 AM
Try this. hope two many of your post with similar requirments
04-25-2017 01:25 AM
@PalanivelThiruvenkadam wrote:
Try this. hope two many of your post with similar requirments
Note: A 2D array is symmetrical, so regardless of the Iteration array, the result will be a X by Y matrix where Y is the biggest of Iteration array. The "shorter" rows will be padded. If you want an array of differently long arrays, you'll need to create an array of clusters, including a 1D array.
/Y
04-25-2017 01:34 AM
Hope the array elements has to iterate based on Iteration elements (value) so obvious that the input should be same array size for both Array as well as iteration.
correct me if i am wrong?
04-25-2017 07:52 AM - edited 04-25-2017 07:52 AM
Yamaeda,
That is a concatenating output tunnel. It will not create a 2-D array.
Here is the simplest implementation.