LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change array size and delete duplicate row

Solved!
Go to solution

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.

0 Kudos
Message 1 of 4
(2,629 Views)

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?

Message 2 of 4
(2,587 Views)

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

Download All
0 Kudos
Message 3 of 4
(2,543 Views)
Solution
Accepted by topic author hiNI

It probaibly would have helped to attach a file that has consecutive duplicate rows. 😄

 

Here's one simple solution.

Message 4 of 4
(2,532 Views)