Hiii Friends,
how are you? i need code for extract peak maximum values from graph. please find sample attachment.
Best wishes.
Hiii Friends,
how are you? i need code for extract peak maximum values from graph. please find sample attachment.
Best wishes.
Last edited by structo; 04-27-2017 at 02:03 AM.
How is the Peak Maximum Value calculated?
Cheers!
Deep Dave
So basically you want to find Dry density & Moisture from the graph?
Here's how I would probably do it:
Regress or otherwise determine an equation for dry density as a function of moisture content. rho(dry)=f(x(H2O)).
1) Often the "hardest" part of performing the regression is choosing what kind of equation to use for f. I have no idea what it should look like, though you might look at your sequence of functions in rows 6 to 15 (and maybe spend some time algebraically manipulating those equations) to see what ideas anc conclusions you come to. For empirical regressions, we often default to polynomials because they are linear and easy to work with, but they are not always well behaved. If you choose a linear function (such as a polynomial), you can use the chart trendline feature (you should probably change your chart from a line chart to an XY scatter chart) or use the LINEST() function.
2) Once you have f(x), then you can simply use your calculus from high school to find the "critical point(s)" of f(x), and then determine which is the maximum. (Here's one tutorial, if you need a refresher: https://www.khanacademy.org/math/ap-...ritical-points ).
Sometimes, Solver can be a useful tool for these kinds of problems. https://support.office.com/en-us/art...d-078f96d1652c You need to identify your A) objective function (probably dry density) and your B) Decision variables (water content or something) and C) any constraints, then have Solver find the maximum of that objective function.
Originally Posted by shg
I'm not sure I can make any solid recommendations until you do the math/algebra part to give me a better idea of what f should look like.
If you really have no idea where to begin, I would suggest that you use the chart trendline feature to add a polynomial trendline: https://support.office.com/en-us/art...4-901a745842ad Then you can use the coefficients of that trendline (be sure to format to show coefficients to full precision) to find the maximum value (either using calculus or using Solver). That , of course, assumes that a polynomial is an adequate choice for f.
I did not see the trendline in the chart in your sample file. Once you have the trendline equation (assuming it is a polynomial), then decide which approach you want to use. Do you want to use Solver to approximate the maximum value (probably easiest and more flexible), or do you want an exact value using calculus (which will require differentiation and root finding algorithms)?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks