LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete same index in multiple arrays

I have an array of waveforms, There are several waveforms, occationally one of the wave forms has bad data (NaN) I have removed this but the waveform has two components (the subsequent array) I am trying to delete the same data point (not bad data) in that waveform. If it helps I am trying to do this in a TDMS file I am making an edited copy of the file and it works fine. I have attached what I have so far in my edit TDMS subVI. Any suggestions or solutions are appreciated. 

Thanks 

Billy

0 Kudos
Message 1 of 6
(2,259 Views)

I may not be understanding you, but if you have the index of the bad data point in one array, can't you simply apply "Delete from array" to the other arrays?

 

I would advise that if you have multiple bad points you are trying to remove, that you remove them in reverse order (from the end of the array to the beginning), since the array size is changing and your index values will shift if going in ascending order.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 2 of 6
(2,242 Views)

the problem is there are around 25 arrays for each group and there are 5 groups and I only want to apply it to one other array but I figured out a way by opening specific channel names when necessary

0 Kudos
Message 3 of 6
(2,239 Views)

Editing TDMS files is inadvised.  You should evaluate those points prior to writing them (I know this doesn't help with your current data files but should help in the future).

0 Kudos
Message 4 of 6
(2,229 Views)

I would like to implement that but unfortunatly in attempting to improve the performance of the data recording the code exploded and does not work anymore. The original person who wrote it is working on it but till then I have a bandaid 

0 Kudos
Message 5 of 6
(2,225 Views)

The problem with deleting elements from a waveform is that you are causing timing mismatches.  A waveform is set up so that each point is at a certain rate (dt).  So if you delete an element from the data array, you just caused a time shift on all elements after that deleted element.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 6
(2,221 Views)