09-19-2018 03:55 AM
Hi,
I don't know whether the heading given is correct or not!! What I need is that in the following program, I'm getting the values from the flow array. But if I'm giving a value through the filler which is not in the array, I need to find the efficiency for which I have got the equation. (i.e; if the flow value from filler is 85 and if we have 80 & 100 in the array, the efficiency which we find should be in between the efficiency value of those two values). How can I do that? Also, I'm not getting the efficiency when 356 is entered instead of 356.0258!! Any helps would be highly appreciated.
Solved! Go to Solution.
09-19-2018 04:24 AM - edited 09-19-2018 04:27 AM
Hi niks,
unfortunately you didn't provide that CSV file needed to run your VI (nor did you use AutoCleanup).
Have you ever tried the Interpolate1DArray function or its companion Threshold1DArray? I guess that's what you need:
09-19-2018 04:29 AM
You have already asked and got solution
09-19-2018 04:30 AM
Hi,
Sorry for not sending the CSV file. Please find the attached CSV file. I haven't tried using the interpolate function till now and I know that I've to use that only. But I'm not familiar with using that function. I'm trying to do the same. Any helps will be appreciated.
09-19-2018 04:33 AM
hi,
That one was using string function. This one was using the normal one. that's why I got confused. Anyway thanks. But again one doubt, whether we can use this interpolation function in case of arrays which are not sorted?
09-19-2018 04:35 AM
09-19-2018 04:40 AM
Hi,
That's exactly my problem. Here the array cannot be sorted since it contains data from different times. So I cannot sort it. Is there any other way that I can approach this problem?
09-19-2018 04:58 AM
Hi niks,
what is "slider" meant to be in your VI?
When you need to interpolate between two samples you should apply a (linear) interpolation between them. Simple as that!
Use the integer part from "slider" to select two samples, then use the fractional part of "slider" to interpolate between those two samples…
09-19-2018 05:05 AM
Hi,
The slider is for entering the input value for flow. According to the change in flow, I need to get the same value from Flow in the table which is the database. And if the value from the slider is not there in the database, then the efficiency value should be a value almost the same as the efficiency values of the corresponding flow values. I hope the question is clear. I can't sort the flow table.
09-19-2018 05:11 AM - edited 09-19-2018 05:14 AM
First f all you need to understand the algorithm. For example, you have values ...15, 16,.....14.5, 16,.... And incoming value 15.1 Which of interval you will interpolate? 15-16 or 14.5-16?