MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to find the kinks in a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104374] Re: [mg104342] How to find the kinks in a list
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Thu, 29 Oct 2009 02:58:52 -0500 (EST)
  • References: <200910280908.EAA14393@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

It took ten wasted minutes to put that in Mathematica format, which you  
should have done already.

The next question is: "What's a kink?" I can see them in a plot:


data = {{0.01, 1.544163223920461*10^-6},
    {0.11, 2.7525893580512636 10^-7},
    {0.21, 6.8152995392824515 10^-6},
    {0.31, 4.972729284187191 10^-6},
    {0.41000000000000003, 6.886896332247575 10^-6},
    {0.51, 5.028506319197025 10^-7},
    {0.61, 1.765869426703084 10^-6},
    {0.71, 4.084953122120491 10^-7},
    {0.81, 8.908881820563147 10^-6},
    {0.91, 3.0059189773700746 10^-7},
    {1.01, 1.3790439392802757 10^-6},
    {1.11, 8.354283708355008 10^-6},
    {1.21, 7.190698243278427 10^-7},
    {1.31, 3.792514692609191 10^-7},
    {1.41, 2.5758219258643325 10^-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}};
ListPlot@data

But what's the mathematical definition you'd like to apply?

I can compute interpolated derivatives:


Clear[f, x]
f[x_] = Interpolation[data][x];
derivatives = f' /@ data[[All, 1]]

{-0.000105706, 0.0000533416, 0.0000504733, -0.0000198743, \
-2.25781*10^-6, -0.0000521806, 0.0000166407, 0.0000149181, \
0.0000444045, -0.0000823082, 0.000046585, 0.0000308789, \
-0.0000763849, 0.0000172154, 0.0191227, 0.330944, 0.955759, 0.743701, \
0.706272, 0.674401, 0.646861, 0.622038, 0.599188, 0.577704, 0.557219, \
0.537501, 0.518455, 0.499807, 0.481592, 0.463485, 0.446009, 0.428442, \
0.386178, 0.204258, -0.0522747, -0.000456524, 0.000114252, \
-0.0000348425, -0.0000864441, -0.000507196}


But that's arbitrary. The default InterpolationOrder is 3, but another  
order could have been used instead... and how big a change in derivative  
implies a "kink"?

Maybe 0.1?

Round[derivatives, 0.1]

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 1., 0.7, 0.7, 0.7, \
0.6, 0.6, 0.6, 0.6, 0.6, 0.5, 0.5, 0.5, 0.5, 0.5, 0.4, 0.4, 0.4, 0.2, \
-0.1, 0, 0, 0, 0, 0}

Round[Rest@# - Most@# &[derivatives], 0.1]

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0.6, -0.2, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.2, -0.3, 0.1, 0, 0, 0, 0}

Maybe that will get you started, but you need a firm definition of "kink".

Bobby

On Wed, 28 Oct 2009 04:08:18 -0500, Mather <sdzbbjhd at hotmail.com> 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
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Opportunities and Player Pro
  • Next by Date: Re: Mathematica7 doesn't copy/paste metafile in vector format
  • Previous by thread: Re: How to find the kinks in a list
  • Next by thread: Re: How to find the kinks in a list