LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Threshold 1D Array Function.vi, and Interpolate 1D array.vi converted to C

I need to convert the Threshold 1D Array Function  to C code.  Has anyone ever done this?  I've been searching around internet but I've had no luck, and I don't program.  Thanks.

 

 

 

0 Kudos
Message 1 of 3
(3,206 Views)

Nothing? 

0 Kudos
Message 2 of 3
(3,175 Views)

Well, that threshold array function is polymorphic and accepts quite a few different inputs (1D array of DBL, 1D array of point clusters, etc.) so you first need to decide which one you need.

 

Sorry, I don't do C, but I probably could write equivalent LabVIEW code quite easily in a few minutes. Where do you have problems?

 

(Basically:

Threshold array: you go through the array and find the first element that is larger than the threshold, then do a linear interpolation between that and the previous element. Add some extra code to deal with edge cases.

Interpolate array: Get elements at the fractional index rounded up and down to the nearest integer and interpolate linearly to the fractional part of the index input.)

0 Kudos
Message 3 of 3
(3,171 Views)