03-18-2010 12:47 PM - edited 03-18-2010 12:50 PM
Hello 2 all !
I have a problem with concatenating two arrays using a FOR loop.
Please see the attached vi.
I've searched the forum but i can't just make it work.
So...any advice about where the problem could lie, is more than welcomed.
THE DATA IS GENERATED AUTOMATICALY WHEN YOU PRESS "CALCULATE".
Here is the problem :
ARRAY 1: ARRAY 2: DESIRED RESULT :
0 0 0
-4 0 -4
2 0 2
0 0 0
7 11 7
-4 6 -4
0
0
0
0
11
6
Thank you very much!
03-18-2010 12:53 PM
Hi Andoro,
which array do you mean? Can you explain what your vi should do?
Mike
03-18-2010 12:59 PM
Hello !
So...when you press the button "calculate", two array are generated, which contain the results of some calculations.For each iteration of the for loop, some results are stored into those arrays.
Two arrays are generated "direct-g22_1" and "invers-g2_1".
I want to concatenate those two array's into the "test" array.
Example : Concatenate the results stored in the "direct-g22_1" and "invers-g2_1" arrays into the "test" array for each iteration of the for loop.
03-18-2010 01:01 PM
03-18-2010 01:02 PM
You can concatenate two arrays by using the Build Array function, right clicking, and selecting "Concatenate inputs".
I can't tell what you are trying to in in your VI. And I really suspect that a lot of your problems may be cause by your use of local variables leading to race conditions.
03-18-2010 01:02 PM
see if this is what you are looking for
03-18-2010 01:05 PM
Thank you all for answering my post !
I'm using LabView 8.5.
The last attached vi doesn't seem to work.
Can you please post a picture or convert the vi to LabView 8.5 ?
Thank you very much !
03-18-2010 01:08 PM
Here it is again
03-18-2010 01:15 PM
Thank you AndyC !
I've tried this approach, but it isn't correct.
Trully, it concatenates the arrays, but each arrays is reapeated at least two times in the "test".
The desired output should be :
0
-4
2
0
7
-4
0
0
0
0
11
6
3
-2
1
3
9
-5
3
-9
-5
3
2
1
Thank you 4 your patience !
03-18-2010 02:02 PM
ah i see. It was a bit difficult to work with your VI, but I hope this would help.