LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
viScience

Add threshold index output on interpolate 1D array function when the 1D array input is an array of points.

Status: New

The interpolate 1D array function has a powerful but under appreciated feature of being able to do segmented linear interpolation when the array input is an array of points.  (For example in an array of PID profile setpoints).  The interpolate function will directly produce the correct interpolated y value for any 'segment' in the array which is very cool.  However it does not expose the threshold index which would be very useful and is most certainly already computed internally.  In the use case of traversing an array of PID profile setpoints, it would be good to know what segment is being interpolated at any given time.

1 Comment
wiebe@CARYA
Knight of NI

Doesn't a Round Toward -Infinity give you that?

 

A Q&R with 1 gives you the index and fraction.

wiebeCARYA_0-1777023054779.png

It seems to be very little effort to get what you're asking for.

 

Adding the index will change the connector pane and might break things. Maybe not, but given the gain why risk it?