LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

x value of max y value from graph

Solved!
Go to solution

Hey everyone,

I have one small issue (form me apparently is huge).

So, how can i get a value x of max y value from graph? I've attached two views. I knew how to take max from array but in my block digram for marque a graph i've used 'df' and 'f0' - how can i turne these on good value whith one will be good present as in the graph. Whot i am going to do is just take a x=f(ymax).

 

If you can help me, please? 

 

Marek

view5.JPG

view4.JPG

 

0 Kudos
Message 1 of 12
(4,955 Views)

Marek,

 

the function you are looking for is called Max&Min and can be found in the array palette.

 

hope this helps,

Norbert

 

Edit: You simply have to calculate the actual x-value regarding your scaling info: x-index * df + f0.

Message Edited by Norbert B on 05-03-2010 03:29 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 12
(4,953 Views)

Post some code for us to look at.

 

You can use the array max/min to find the max value of y. This will then also give you the index. You can use the index to then find the corrosponding value of x.

Message Edited by Lucither on 05-03-2010 03:27 AM
------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 3 of 12
(4,952 Views)

Thank for Your reply,

My issue is that, I don't knew how to take index value from two parameters df and f0?  

view7.JPG

 

 

0 Kudos
Message 4 of 12
(4,942 Views)

hi lucither,

  Just check this attachment...

 

 

T hanks and regards,

srikrishnaNF

Regards,
Srikrishna


Message 5 of 12
(4,940 Views)

Hi Gfds,

 

Your 2 paremeters df and f0 are not arrays, they are single double values?? You have made a cluster out of 2 double values, initialised an array with them but not set an array size, giving you an uninitialized array and then tried to index it?

 

If you can post some actual code rather then just a glimpse we may be able to see what you are trying to do and help. Is not all that clear at the moment.

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 6 of 12
(4,924 Views)
Solution
Accepted by gfds

Hi Gfds,

 

Just realised what you are after:

 

find corrosponding x of y.png

 

I beleive this is what you are after.

 

Rgs,

 

Lucither

Message Edited by Lucither on 05-03-2010 04:12 AM
------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 7 of 12
(4,915 Views)

Here without Goldberg:

frequency of max value.png

 

Norbert

 

 

Edit: Lucither bet me 😞

Message Edited by Norbert B on 05-03-2010 04:12 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 8 of 12
(4,913 Views)

Norbert,

 

If it makes you feel better i think i had a head start 🙂

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 9 of 12
(4,906 Views)

Now I am very happy. I've done as SrikrishnaNF showed in one version and second as Norbert B and Lucither showed.Two works perfectly.

view8.JPG

 

Thank you SrikrishnaNF, Norbert and Lucither you answers were great, which such I wos awaiting. 

 

I wish you nice work. 

 

Best regards

Marek

0 Kudos
Message 10 of 12
(4,887 Views)