キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

linear interpolation

hello,
 
I would like to reduce the effective sampling frequency by linear interpolation from 5 kHz. How must I do ?
 
Thank you
0 件の賞賛
メッセージ1/11
5,289件の閲覧回数

If I understood you correctly, you have data sampled at 5kHz, and you want to reduce the effective sampling frequnecy, say to 1 kHz (just to illustrate the point)

Assuming data are in an array,  there are  many options

1) pick points from the array at indices that are multiple of 5  (0, 5, 10, 15,....etc)

2) average every 5 points

3) use the median of every 5 points

4) use a weighted average of every 5 points ,

etc....

.

.

.

 

0 件の賞賛
メッセージ2/11
5,280件の閲覧回数

Exactly, I have data sampled at 4kHz and I want to reduce at 3kHz.

Do you know what VI of labview do I use to do this. For example, what VI for mediane, for average ????

Thank you

0 件の賞賛
メッセージ3/11
5,273件の閲覧回数
try the attached vi, it uses linear interpolation.   Simple and illustrates the point
0 件の賞賛
メッセージ4/11
5,265件の閲覧回数
To use this VI, I must transform my signal in a array ????
 
But I have a small problem, I don't know how integrate the VI at my project.
 
Thank you
0 件の賞賛
メッセージ5/11
5,262件の閲覧回数
How are you getting the data ?  When you collected the samples, they are read as an array, and you probably saved them in a file ?
 
What is the format of your data ?  at least you should be able to have LV read it as an array
 
 
0 件の賞賛
メッセージ6/11
5,255件の閲覧回数
hello,
 
For the VI that you gave me, I put the VI in library user. But when I open the VI in an other VI, I haven't input or output. So, I can't connect it.
 
Thank you
0 件の賞賛
メッセージ7/11
5,231件の閲覧回数
You need to connect the control inputs and output indicators to terminals
 
Right click on the vi icon.....slect the right pattern.
then, select the controls and indictors and connect them to terminals
 
If you are not aware of that, I suggest that you review some LV tutorials
0 件の賞賛
メッセージ8/11
5,225件の閲覧回数

Dr. Imad

 

The VI you provided for the linear interpolation works well and very useful. I had a question though - Is there a way to increase the size of the new array to show all the numbers containing in that array. For example if the old sample rate is 1 and new sample rate is 2, and have 3 elements in the old array. The new array will show 3 elements only. (see attachement). 

 

Any help will be appreciated. Thanks. 

0 件の賞賛
メッセージ9/11
4,472件の閲覧回数
0 件の賞賛
メッセージ10/11
4,448件の閲覧回数