X-Received: by 10.13.231.68 with SMTP id q65mr12656326ywe.156.1482968622156; Wed, 28 Dec 2016 15:43:42 -0800 (PST) X-Received: by 10.157.20.197 with SMTP id r5mr2057906otr.9.1482968622064; Wed, 28 Dec 2016 15:43:42 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!d45no860526qta.0!news-out.google.com!u18ni1062ita.0!nntp.google.com!b123no4397175itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.graphics.apps.gnuplot Date: Wed, 28 Dec 2016 15:43:41 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=188.20.239.46; posting-account=8aAfcQoAAAAFyM529Tf50ab4Op9511Om NNTP-Posting-Host: 188.20.239.46 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7a234a12-d161-400a-9f1b-633aea70b392@googlegroups.com> Subject: Re: Intersection point of data-plot and linear-function From: =?UTF-8?Q?Markus_Gr=C3=BCnwald?= Injection-Date: Wed, 28 Dec 2016 23:43:42 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.graphics.apps.gnuplot:3501 Am Dienstag, 27. Dezember 2016 11:02:35 UTC+1 schrieb Karl Ratzsch: > Am 27.12.2016 um 00:13 schrieb Markus Gr=C3=BCnwald: > > Just to be sure (because i need the same thing - and maybe there were l= ot of improvements till this last post): > > There is no way in gnuplot to get the intersection point of a data-set = (or a smoothed spline of it) with a linear function (y=3Dk*x+d)? > >=20 >=20 > No. At least no simple, straightforward way. Remember gnuplot is a > plotting tool, not a data evaluation suite. i suspected that - wanted just ask to be sure (thanks for quick response) > If you can model your data by some analytical function(s) that you > can fit, then you could derive the intersection, and use "set label > point" to mark it. i decided to make a linear fit at a short range where the intersection is e= stimated - with a few iterative runs i'll get a quite good approximation: [code] F_max_x=3D### g1(x) =3D k1*x + d1 g2(x) =3D k2*x + d2 k1=3D###; d1=3D### fit [F_max_x-0.25:F_max_x+0.25] g2(x) "DATA.txt" using 1:2 via k2,d2 F_max_x=3D(d2-d1)/(k1-k2); F_max=3Dk1*F_max_x+d1 [/code]