LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interpoltae a 1D array to get a different 1D array size

hi
i have a 1D array of 150 elements. in order to manipulate the data i must expand the array to have 480 elements.
how can i interpolate the array in order to expand it.
thanks
Amose

Message Edited by amose on 12-26-2006 04:13 AM

0 Kudos
Message 1 of 5
(3,589 Views)

If you want to do a real interpolation (make the new elements have different values than the existing ones), then you can use the interpolation function and do something like this:

If you just want to pad out the array, you can modify the VI posted here to work with a 1D array.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
Message 2 of 5
(3,581 Views)

If you have LabVIEW 8.0 or later, there is "interpolate 1D" which is very flexible (e.g. x-values in input and output don't need to be evenly spaced, large choice of interpolations (linear, spline, etc.)).

An implementation for a simple linear interpolation is shown here, modify as needed.

Check the online help for more details and options.

 

Message Edited by altenbach on 12-26-2006 12:00 PM

Message 3 of 5
(3,567 Views)


altenbach actually posted this:


Please tell me that you do not have controls set to appear as icons on the diagram. Smiley Sad

___________________
Try to take over the world!
0 Kudos
Message 4 of 5
(3,560 Views)


@tst wrote:
Please tell me that you do not have controls set to appear as icons on the diagram. Smiley Sad

I am almost too embarrased to admit that I haven not really touched the LabVIEW options since installing on a new PC a few weeks ago. So, yes, they're set to show as icons at the moment, the default behavior. 😉

For illustrative purposes, such as in a code image as above, it probably adds a little bit of clarity to the diagram picture. 🙂

(In my own code, I rarely use icons).

0 Kudos
Message 5 of 5
(3,555 Views)