05-29-2014 04:50 PM
Hello,
I am running a program that does a for loop 3 times. In each loop, data is collected for x and y points (10 in the example provided). How can I output the array with the 30 points in a simple 2D array (size 2x30)?
Also, from the array, how do I delete duplicate rows that contain the same x-value?
Thanks,
hiNi.
Solved! Go to Solution.
05-29-2014 07:27 PM - edited 05-29-2014 07:28 PM
Right-click the output tunnel of the outer loop and change the mode to concatenating (right-click...tunnel mode...concatenating). Change your current output array to 2D and resize as needed.
Are rows with the same x-value always adjacent?
05-30-2014 09:54 AM
Hello,
THANK YOU for solving my first issue! Attached is the data set that contains the duplicate entries for the x-axis values. The y-axis value may be different, but not the x. I would like to delete the 2nd row that contains the same x-value.
Here is simple example of my input and desired output:
IN:
28.512000 -115.310532
28.812000 -86.937660
29.112000 -116.877052
29.412000 -87.223625
29.412000 -111.349045
30.012000 -86.510780
30.312000 -112.048187
OUT:
28.512000 -115.310532
28.812000 -86.937660
29.112000 -116.877052
29.412000 -87.223625
30.012000 -86.510780
30.312000 -112.048187
I am thinking of comparig the last x-axis value to the current one, and if it is the same, then not parse that row. The attached VI is as far as I got.
Any help will be greatly appreciated.
Thanks,
hiNi
05-30-2014 10:36 AM
It probaibly would have helped to attach a file that has consecutive duplicate rows. 😄
Here's one simple solution.