06-03-2008 05:09 AM
06-03-2008 05:48 AM
As far as I can understand, your situation is as follows:
1. Your instrument returns you a set of data that describe a curve
2. You want the same (or very similar) curve described with fewer points
The first obvious thing is that reducing the number of points will result in losing some detail in the curve and possibly masking some very fast spike your signal can have (and perhaps you would like to maintain...), so you'll have to consider if doing so you are sure not to alter your measure in a radical way.
Supposing the answer is not, what you could do could be to determine an interpolant of original data (using PolyFit or other functions inside Advanced Analisys >> Curve fitting library) and then use the coefficients to generate a new curve with fewer points (use Ramp to generate a new X-axis array and PolyEv1D to generate new data based on new X-axis - this method works for fitting functions that return an array of coefficients that describe the interpolant).
Alternatively you could use the PolyInterp function in a loop (Advanced Analisys >> Interpolation library) appropriately choosing every new x value and the correct subset of data to interpolate to generate the new y value.
06-03-2008 10:08 AM
06-03-2008 11:13 AM
The data array is made only of amplitute possibly because delta time is a constant (that is: samples are taken at constant rate). In this case, knowing the dx you can create a x-axis array with Ramp or a simple loop. Interpolation functions like PolyFit will need an actual x array before they can calculate the interpolant.
NI_Device_user_sb wrote:
The message I received on my GPIB board is only made of amplitude values. So I haven't got any axis values. Will it cause problems for interpolation functions?
06-05-2008 03:50 AM - edited 06-05-2008 03:54 AM
06-05-2008 08:20 AM
06-05-2008 08:35 AM
06-09-2008 03:25 AM - edited 06-09-2008 03:26 AM
06-17-2008 08:28 AM
07-25-2008 04:01 AM