computerfixins
asked on
Digital upsampling an array...in vb.net
Hey,
Was just wondering what was the best way to digital upsample an array of numbers....
trying to make an byte array of dynamic size's from 50 to 2000 with values in the 0-254 range...I want result array to be a fixed size of 4096....the realtionship bewteen the index and data must be contained
The array is then graphed with x= the data and(voltage) y = index of array(tiime)
I suppose you could go through each two values, find the avrage and then fill in accordingly.....I am hoping there is an easier/faster way...
Was just wondering what was the best way to digital upsample an array of numbers....
trying to make an byte array of dynamic size's from 50 to 2000 with values in the 0-254 range...I want result array to be a fixed size of 4096....the realtionship bewteen the index and data must be contained
The array is then graphed with x= the data and(voltage) y = index of array(tiime)
I suppose you could go through each two values, find the avrage and then fill in accordingly.....I am hoping there is an easier/faster way...
I would recommend that you do the display handling in the display part of the code then rather then change the coding logic. By upsampling it would just create extra overhead and such. I would normilize all the time data qand multiply with you upscale value (4096), i.e. if you have 250 sample points, and working on point 6, then the x location should be (6/120)*4096.
So basically you are doing the mapping when you are doing the plot rather then a pre-processing the array. Also if you want finder interpolation (i.e. between sample point), just do a linear interpolation (or whatever suites you data) for the in-between points. (Divided Differences Linear Interpolation)
-Ram
So basically you are doing the mapping when you are doing the plot rather then a pre-processing the array. Also if you want finder interpolation (i.e. between sample point), just do a linear interpolation (or whatever suites you data) for the in-between points. (Divided Differences Linear Interpolation)
-Ram
ASKER
Hey,
The values from the upsampled array are also processed through a fast fourier transform...so the actaul data is needed...
Basically the stem of the problem is the FFT....
FFT is a function that gives you -db response vs mhz when you pass in amplitude and Time
So lets say i pass in 1us or microsecond of data...the atod board hardware contraints make this only 100 datapoints of data
Then i pass in the 100 datapoints to the fft....
the FFT returns 100 datapoints over 100mhz....not too bad....
but then i only want to look at a range of about 5mhz....so i draw my graph accordingly, but i only have about 5 datapoints...
After the FFT is drawn i also do several functions, and manipulate the wave....
The values from the upsampled array are also processed through a fast fourier transform...so the actaul data is needed...
Basically the stem of the problem is the FFT....
FFT is a function that gives you -db response vs mhz when you pass in amplitude and Time
So lets say i pass in 1us or microsecond of data...the atod board hardware contraints make this only 100 datapoints of data
Then i pass in the 100 datapoints to the fft....
the FFT returns 100 datapoints over 100mhz....not too bad....
but then i only want to look at a range of about 5mhz....so i draw my graph accordingly, but i only have about 5 datapoints...
After the FFT is drawn i also do several functions, and manipulate the wave....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Idle_Mind