LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract Y values

Hello.
I have a two-dimensional array (XY) and from that I have created a graph of Y as a function of X.
I want to get multiple Y values (for different X values) and use them within the software.
Anyone know how to help me?
If there is an explanatory video it would be great.
I'm been sitting on this for a long time ...

0 Kudos
Message 1 of 7
(1,332 Views)

Please attach a simple VI showing your data structures.

 

Your description is very ambiguous because you use the term X and Y in seemingly unrelated contexts: Is the 2D array just two rows (or columns), one for X and one for Y or is the data 3D where the two array indices are X and Y and the element value is Z? Where are the multiple Y values for each X located? are all X values unique? Are they ordered (e.g. non-descending)? Do you want interpolation if the desired X does not exist?

0 Kudos
Message 2 of 7
(1,330 Views)

First of all thank you.
I have attached a vi file that will explain my intention.
I want to know what the value of array Y2 is as a function of array X1, but array X1 is different from array X2 (they have the same initial value and finite value, but their construct values are different).

0 Kudos
Message 3 of 7
(1,318 Views)

OK, your VI does not have a single 2D array anywhere. You can just interpolate. Try this:

(Note that you don't need any express VIs to do an XY graph!)

 

 

altenbach_0-1595535525667.png

 

0 Kudos
Message 4 of 7
(1,291 Views)

it worked!!!
Wow, thank you so much.

0 Kudos
Message 5 of 7
(1,279 Views)

The proper protocol is to mark the message that actually gave you the answer as the solution, (or you can mark more than one message if several helped), not your "Thank You" message.

 

1.  It allows someone looking at this thread in the future to know precisely which message was the solution.

2.  It gives credit to the person who supplied you the solution.

0 Kudos
Message 6 of 7
(1,270 Views)

@segkash wrote:

Wow, thank you so much.


Of course it works! Now make sure you understand exactly what the code does and how "interpolate 1D array" functions when given a array of xy points as done here. This is a very useful function!

0 Kudos
Message 7 of 7
(1,264 Views)