Discussion:
interpoltae a 1D array to get a different 1D array size
(too old to reply)
tst
2006-12-26 11:10:10 UTC
Permalink
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:
<img src="Loading Image..."><a href="http://forums.ni.com/attachments/ni/170/221850/1/Example_VI.png" target="_blank"></a>
If you just want to pad out the array, you can modify the VI posted <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=133867#M133867" target="_blank">here</a>&nbsp;to work with a 1D array.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. <a href="http://cnx.rice.edu/content/col10241/latest/" target="_blank">Here</a>, <a href="http://zone.ni.com/devzone/learningcenter.nsf/03f7c60f17aad210862567a90054a26c/55974411828f779086256ce9007504bd" target="_blank">here</a>, <a href="http://www.mech.uwa.edu.au/jpt/tutorial/index.html" target="_blank">here</a>, <a href="http://www.iit.edu/~labview/Dummies.html" target="_blank">here</a> and <a href="http://www.upscale.utoronto.ca/GeneralInterest/LabView.html" target="_blank">here</a> are a few you can start with and <a href="http://www.fafiles.com/" target="_blank">here</a> are some tutorial videos. You can also contact your local NI office and join one of their courses. In addition, I suggest you read <a href="http://zone.ni.com/devzone/conceptd.nsf/webmain/CB5E46406090C61C86256A7000559B66" target="_blank">the LabVIEW style guide</a> and the LabVIEW user manual (Help&gt;&gt;Search the LabVIEW Bookshelf).


Example_VI.png:
http://forums.ni.com/attachments/ni/170/221850/1/Example_VI.png
altenbach
2006-12-26 20:10:10 UTC
Permalink
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.
<img src="Loading Image...">
Check the online help for more details and options.
&nbsp;Message Edited by altenbach on 12-26-2006 12:00 PM


interpolate.png:
http://forums.ni.com/attachments/ni/170/221874/1/interpolate.png
tst
2006-12-26 21:40:07 UTC
Permalink
altenbach actually posted this:


<img src="http://forums.ni.com/attachments/ni/170/221874/1/interpolate.png">

Please tell me that you do not have controls set to appear as icons on the diagram. :smileysad:
altenbach
2006-12-26 22:10:09 UTC
Permalink
tst wrote:
Please tell me that you do not have controls set to appear as icons on the diagram. :smileysad:


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).

Loading...