09-20-2006 04:52 PM
I would like to convert a waveform data set that has 1746 data points into a signal that has 500 data points by selecting the x-value from every 3.5 (1746/500) points and eliminating all other points. Ideally I would like to average the x-value of every 3.5 points and turn that into one data point in the resulting signal but I am not sure if that is actually possible. If at all possible I want to use the express VI's as I am not too familiar the other programming language. I have been unsuccessfully trying to use the Align and Resample express VI because it is supposed to re-sample a signal every n data points but for some reason isn't working. I have attached the data set (titled: Input) as well as a simplified program (titled: Resample Example). Please contact me if you require any further information.
Thanks HEAPS!
09-20-2006 05:36 PM
Here's one example using the array funtions. I'm sure there are a lot more and this one does not handle what's left over. Onther option if you have a lot of data points would be to use a decimation algorithm there are some good ones on the forum
good luck
Eric
09-20-2006 05:49 PM
@pcorm wrote:
but for some reason isn't working.
Of course it is working. Remember that you deal with dynamic data, so the new dx is used by the graph to adjust the increment for display purposes. The number of data points is definitely less after resampling.
(Initially you don't have an increment, so it is taken as 1)
07-08-2010 04:17 AM
I have a similar re-sampling issue and think I'm missing something here.
The attached vi reads two analogue voltage levels one is a noisy signal (from leg muscle activity EMG) the other is from a foot switch, which I am using to partition the EMG into blocks of data (strides). There may be up to ten blocks of data which I'm trying to average, but they first need to be re-sampled to get them the same size (such that they represent one complete gait cycle). I am currently saving the blocks to TDMS file (for my benefit) then opening the file and re-sampling by changing dt based on the data size. But it's not working. I've also tried using the express resample vi that is used in the examples here, but it outputs nothing.
Any ideas?
Note: Change the file extention of test.vi to .tdms. It is an example data set. .tdms isn't a valid extension for upload to the forum 😞