Re: How to find the kinks in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg104352] Re: [mg104342] How to find the kinks in a list
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Thu, 29 Oct 2009 02:54:41 -0500 (EST)
- References: <200910280908.EAA14393@smc.vnet.net>
Mather wrote: > Hi, all > > I want to get the two kinks in the following list, say, x=1.5 and 3.3 > by Mathematica. > However I have no idea which command to employ. > Can anyone help? Thanks in advance! > > 0.01 1.544163223920461e-6 > 0.11 2.7525893580512636e-7 > 0.21 6.8152995392824515e-6 > 0.31 4.972729284187191e-6 > 0.41000000000000003 6.886896332247575e-6 > 0.51 5.028506319197025e-7 > 0.61 1.765869426703084e-6 > 0.71 4.084953122120491e-7 > 0.81 8.908881820563147e-6 > 0.91 3.0059189773700746e-7 > 1.01 1.3790439392802757e-6 > 1.11 8.354283708355008e-6 > 1.21 7.190698243278427e-7 > 1.31 3.792514692609191e-7 > 1.41 2.5758219258643325e-6 > 1.51 0.00573372886943746 > 1.61 0.09069025128158258 > 1.71 0.1678921607552329 > 1.81 0.24047592904187015 > 1.9100000000000001 0.3094989860449043 > 2.0100000000000002 0.37555342886640686 > 2.11 0.43898726713721536 > 2.21 0.500041232643779 > 2.31 0.5588795919592797 > 2.41 0.6156217903422918 > 2.5100000000000002 0.6703511870298868 > 2.61 0.7231492006404858 > 2.71 0.7740553083481225 > 2.81 0.8231311485576547 > 2.91 0.8703722465175462 > 3.0100000000000002 0.9158530005108363 > 3.11 0.9595743351972397 > 3.21 1.0015438350017574 > 3.31 1.034334208101605 > 3.41 1.0346205212139916 > 3.5100000000000002 1.0346175133605735 > 3.61 1.0346312322976905 > 3.71 1.0346297067475791 > 3.81 1.0346299273452295 > 3.91 1.0346026798402437 One approach ise to use interpolating functions, and check for jumps in the second derivative. In the example below I imported your data (using "Table" format), and worked from there as below. In[138]:= ff = Interpolation[data]; gg[t_] = ff''[t]; d2vals = Table[{t, gg[t]}, Evaluate[{t, Sequence @@ dom, .1}]]; pairs = Partition[d2vals, 2]; bigdiffs = Select[pairs, Abs[#[[2, 2]] - #[[1, 2]]] > 1 &]; Map[Mean[{#[[1, 1]], #[[2, 1]]}] &, bigdiffs] Out[143]= {1.46, 3.26} There are probably also some reasonable ways to do this sort of thing using Fourier or convolution. Daniel Lichtblau Wolfram Research
- References:
- How to find the kinks in a list
- From: Mather <sdzbbjhd@hotmail.com>
- How to find the kinks in a list