LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delet from array

The problem is that after detection of peaks and valleys
using peak detector.vi there are some peaks and valleys
are close to other. I want to delet from the array of locations
of the peaks/valleys any point that less in number of points
(no of index) than the next point by 72 point if the corresponding
amplitude value less than the next point amplitude else the next
point both(amplitude and locations) are deleted



for i=0:endof(locations1)

if(locations1(i)-locations1(i+1) <= 72)
if(Amplitude1(i) delete(Amplitude1(i));
delete(locations1(i));
else
delete(Amplitude1(i+1));
delete(locations1(i+1));
end else
end if

I dont know how to it in labview. Please hel
p me.
If any one need to see the the labview file, to make it easy to do the problem, I will post it.
thanks in advance
0 Kudos
Message 1 of 3
(2,915 Views)
Ok, just to illustrate "deleting" I've made a nearby literal translation of your algorithm to LV slightly changing indexing rules (see diagram). IMHO, this is not an optimal approach as deleting from array is not a kind of a fast operation. Looks like it will be better to construct two new arrays with points removed instead of deleting them from original arrays.
Message 2 of 3
(2,915 Views)
Thank you 'defulfo' very much.
you helped me greatly.
0 Kudos
Message 3 of 3
(2,915 Views)