Jump to content

how to sort out a maximum value in an array


justus

Recommended Posts

I wish to sort out from data obtained from a keithley meter in a 2d array such that I get the maximum of all both on the x and y- axes and get the product of the maximum values. I have tried to use the sort function but it just gives me the last value of the x axis and not the maximum of the x and the corresponding maximum of y. Could someone please help? Regards

Link to comment
I wish to sort out from data obtained from a keithley meter in a 2d array such that I get the maximum of all both on the x and y- axes and get the product of the maximum values. I have tried to use the sort function but it just gives me the last value of the x axis and not the maximum of the x and the corresponding maximum of y. Could someone please help? Regards

In the array functions pallette is the Max and Min of array function. It returns the max and min of what ever you feed it and their indexes.

That seems so simple that I must be misunderstanding your question. Are you wanting to find all the local maxima and minima? That is trickier. I suppose you would need to define "local."

There must be a function or example to do that but I haven't used it.

Mike

Link to comment

Yes, your request is a little unclear. Could you post a short 2D table of data showing exactly what you are trying to get? That will probably make it pretty trivial to give you the right solution/VIs.

In fact, the exercise of doing it in a table for us will probably show you how to do it yourself. If not we'll help.

Link to comment

Thanks for the solutions,

I have attached here a table as an example to illustrate. The table has collumns ABC, A and B are readings obtained from keithley meter and C is the product of A & B. C has a maximum value indicated at row labelled D (1.82E-1). I wish this to be displayed as the maximum of collumc C and also display the inputs of A and B that give this maximum.

I have also attached a block diagram to implement this but when I RUN the ARRAY MIN MAX returns the last value and not the maximum.

In the array functions pallette is the Max and Min of array function. It returns the max and min of what ever you feed it and their indexes.

That seems so simple that I must be misunderstanding your question. Are you wanting to find all the local maxima and minima? That is trickier. I suppose you would need to define "local."

There must be a function or example to do that but I haven't used it.

Mike

Link to comment

Thanks for the solutions,

I have attached here a table as an example to illustrate. The table has collumns ABC, A and B are readings obtained from keithley meter and C is the product of A & B. C has a maximum value indicated at row labelled D (1.82E-1). I wish this to be displayed as the maximum of collumc C and also display the inputs of A and B that give this maximum.

I have also attached a block diagram to implement this but when I RUN the ARRAY MIN MAX returns the last value and not the maximum.

Download File:post-4061-1139399623.doc

Download File:post-4061-1139399683.doc

Link to comment
  • 8 years later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.