LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decimate

How can I decimate an array or waveform by a factor that is not a decimal
(e.g. 100.000 samples -> 40.000 samples: factor 2,5) ?!?
Thanks


Philipp
0 Kudos
Message 1 of 4
(3,224 Views)
Hi!

Check the answer of the following question. Although is not exactly the answer, it can give you a head star, specially because a vi is provided.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000007D230000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

Good luck!
EJV
www.vartortech.com
0 Kudos
Message 2 of 4
(3,224 Views)
I've written my own vi that decimates by any factor. But thank you anyway.

Philipp
0 Kudos
Message 4 of 4
(3,224 Views)
Philipp,
As you must be aware, its a perplexing problem to decimate an array by anything other than whole numbers, since the indexes of an array are only whole numbers.

However, there is an "Interpolate 1D Array" VI (see your Help) which could add resolution to your array (say by a factor of 10), this would then allow you to use the Index Array VI to extract every 25 elements vs. every 2.5 elements. This would give you the most linear output and allow for non-integer factoring.

Other option is simply to work with the Index array and have it round non-whole numbers (2.5) into whole numbers (2.5 = 3) to index the elements from your array. This is shown in the attachment.

Also, Enrique's attachment works well too, but you may need to alter it for non-whole nu
mbers.

Let us know what you come up with, Good Luck, Doug
0 Kudos
Message 3 of 4
(3,224 Views)