04-08-2017 09:49 AM
Hellou.
I have two axis, arrays - x and y. I have them on the xy graph and also independently on two graphs.
I need value from x-axe when y-value is equal to 0.
Can someone help me?
Thanks, Steef
Solved! Go to Solution.
04-08-2017 10:37 AM - edited 04-08-2017 10:39 AM
We need to see your VI instead. XY graph accept a wide variety of data types (clusters of x and y arrays, arrays of points, complex 1D arrays, etc.) so we have no idea what you have. Are the x-values spaced equally or randomly?
You only circled one zero crossing, but I see two. Do you want both?
If the data is non-descending, you can use threshold array of the array of points, which gives you a linear interpolation between the two adjacent values. How closely are the points spaced? Is there noise (e.g. could there be two or zero crossings very close together?)
A better way would probably be to do a nonlinear fit to a mathematical model describing the data, then calculate the zero crossing from the best fit parameters.
Please attach your VI and some typical data (e.g. select the graph once it displays the data and "edit..make selected values default" before attaching). We cannot guess what you have.
04-10-2017 02:21 AM
That is a measurements from Keysight U2541A. So, I thinks that is 250 samples in one graph.
I need only circled zero crossing.
For example I can read manually this vallue from my Array, but I need that as indicator - so how have I there values Hm,Br,Bm.
Thank you.
Steef
04-10-2017 02:38 AM - edited 04-10-2017 02:44 AM
Hi Steef,
I need value from x-axe when y-value is equal to 0.
You have two arrays, one with X values, the other with corresponding Y values.
Search the X array for zero crossings and get the index of those zero crossings. (Hint: a ZeroCrossing is indicated by two consecutive values with different sign…)
Use these indices to get the corresponding value from your Y array.
To give an idea:
(Try to avoid DDT wires and ExpressVIs, they don't help to understand your own VIs!)
Next time you should use the AutoCleanup tool before uploading a VI… 😄
04-10-2017 02:44 AM
How I get this index?
Thank you for Autocleanup tool 🙂 I didn´t know that.
04-10-2017 04:10 AM
And what kind of wires should I use?
I have problem with that, I don´t know "divide" that array - in loop I can´t compare this number/numbers with 0.
04-10-2017 04:38 AM
04-10-2017 05:11 AM
Hi GerdW,
yes, I do. But, can you sent me that file in VI? Thats could help me.
Thanks
Steef
04-10-2017 05:37 AM