justus Posted February 2, 2006 Report Share Posted February 2, 2006 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 Quote Link to comment
mross Posted February 2, 2006 Report Share Posted February 2, 2006 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 Quote Link to comment
Mike Ashe Posted February 2, 2006 Report Share Posted February 2, 2006 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. Quote Link to comment
i2dx Posted February 3, 2006 Report Share Posted February 3, 2006 maybe this is the solution? Quote Link to comment
justus Posted February 8, 2006 Author Report Share Posted February 8, 2006 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 Quote Link to comment
justus Posted February 8, 2006 Author Report Share Posted February 8, 2006 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 Quote Link to comment
B Chavez Posted February 8, 2006 Report Share Posted February 8, 2006 Try this Download File:post-1591-1139424456.vi 1 Quote Link to comment
malef Posted February 9, 2006 Report Share Posted February 9, 2006 or use "Sort 2D Array.vi" from http://www.OpenG.org to sort all. Manfred Download File:post-831-1139473912.llb Quote Link to comment
justus Posted February 9, 2006 Author Report Share Posted February 9, 2006 Try thisDownload File:post-1591-1139424456.vi Thank you I am trying it out as I customise it in my VI Quote Link to comment
justus Posted February 16, 2006 Author Report Share Posted February 16, 2006 [Thank you all, I managed to sort out the problem by placing the array index outside the loop that is creating the array. Thank you all Justus Quote Link to comment
Konstantin Posted June 15, 2014 Report Share Posted June 15, 2014 or use "Sort 2D Array.vi" from http://www.OpenG.org to sort all.Manfred Download File:post-831-1139473912.llb Thnx a lot! That... 3912.llb really helped me. The main trick is to bundle two-dimensional array to the cluster. Quote Link to comment
bigjoepops Posted July 18, 2014 Report Share Posted July 18, 2014 Try this Download File:post-1591-1139424456.vi This seemed like the best solution for the problem! Didn't think he was asking about sorting, just finding the max product and the associated inputs for the product. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.