06-10-2024 03:17 AM
What VI's can I use to get the maximum Y-value from an XY graph, as well as its corresponding X-value?
Solved! Go to Solution.
06-10-2024 03:59 AM
Generally you don't get it from the graph but from the data arrays you feed it with. Regardless, there's an Array Max/Min function that should give the result.
06-10-2024 04:55 AM
Hello,
I can't find the "Unbundle XY By Channel" VI; the only unbundle VI's I can find are the Unbundle and Unbundle By name VI's. Maybe that VI has a different name In version 2015?
Also, when using the Index function, I can only get what I assume to be the point number corresponding to the maximum Y-value, and not the X-value itself. Is there a way to display the X-value itself?
06-10-2024 05:50 AM
That is an "AI" generated answer. They like to imagine things that sound plausible but do not exist.
What data format do you feed into the graph? It is always helpful to attach code to be sure we are talking about the same thing.
If you have an array of XY-points, build an array of Y values and use Array Max & Min.
06-10-2024 09:02 AM
The graph was created from the measurements obtained by a machine. Is there a way to obtain the X-value that corresponds to the maximum Y-value?
06-10-2024 09:11 AM
Yes, everything you need should be right there. Find the maximum using array max & min, then use the max index output to index into the x-value array.
If you want further help, please show some code.
06-11-2024 01:00 AM
You used the Unbundle By Name VI right? How can I indicate that the type of data to bundle are DBL types?
06-11-2024 02:33 AM
I did not use unbundle by name, just unbundle (without names). To define the data types, create a cluster to use as template or convert it to the desired data type before bundling. You might want to take a look here: https://www.ni.com/de/support/documentation/supplemental/08/labview-arrays-and-clusters-explained.ht...
06-11-2024 08:47 AM