LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using linear interpolation for to find a certain X from data in a 1D array

Solved!
Go to solution

Sorry i was mistaken, i did not use the Min Max after inverting. The case structure on the right contains the functions. I actually use the Min Max before inverting the array and got the numbers swapped. You can see between the High Pass case and Low Pass case i swapped the indicators. Maybe if i had used the Min Max after inverting the array it would have worked properly. Not sure but it does seem to be functioning as far as what i need it to do. To change the type of filter change the code in formula node from Av=Xc/(R+Xc); to Av=R/(R+Xc);

0 Kudos
Message 11 of 12
(758 Views)

OK, so you reverse the array instead of negating.

 

A few comments:

  • Index array is resizable, so you only need one instance. If you want elements #0 and #1 you don't even need to wire the indices.
  • All the min/max code and the orange indicators etc. are identical in the two cases and thus belong before the loop. No need for local variables!
  • The small case structure belongs after the big case structure. This way you only need one instance and if you ever need to change the code, you only need to make the changes in one place.
0 Kudos
Message 12 of 12
(754 Views)