LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph cursor multiple point

Hello, I want to know how can I specify the position of y=0

 

I use cursor ,then key 0 in the right side blank, and it shows the first point of y= 0 of the curve

However I only want to know the other point (position of y=0 in the wave)

 

How can I do with the cursor function?

 

And actually I also hope that I can get the value immediately after I get this curve , Is there any way to set this condition?

 

I'll appreciate any of advice.

0 Kudos
Message 1 of 4
(3,321 Views)

If I understand your question correctly, you are looking for zero crossings, or sign changes in your data?

 

I don't think there is an easy way to do this using the cursor functions, but you can use the "sign" function inside a for loop with your data.

 

Find Sign Changes.png

0 Kudos
Message 2 of 4
(3,304 Views)

I want to specify the inflection point, and the curve in picture "test"  is the second derivative of the original fitting curve.

 

sorry I don't understand your advice.....I'm just a beginner......

 

Could I get the inflection point through this way?

0 Kudos
Message 3 of 4
(3,294 Views)

Yes that's exactly what this code does, but you should convince yourself of that. You can turn on highlight execution "lightbulb" and see what is happening everytime the loop runs. 

 

Do not use dynamic data (big dark blue wires) it hides and confuses what is going on. Input your actual data, the array of dbl that contains your y" (second derivative) values where I have labeled "sample data". It is just a sine wave right now. In output array you will get the indices of the zero crossings. 

 

If you have X data too, then to go from indices to real values you use "index array" inside a for loop. Have it use the entire X data, but auto-index on the indices (as shown below).

 

Zero Crossings 1.png

 

Of course you don't need 2 for loops, you could do it all in one. But I think finding the indices is more modular (I would put it in a SubVI), and it is how many of the built in array functions are designed, so it is consistent. But if you want it all in one loop it should be faster:

 

Zero Crossings 2.png

0 Kudos
Message 4 of 4
(3,282 Views)