Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3501

Re: Intersection point of data-plot and linear-function

Newsgroups comp.graphics.apps.gnuplot
Date 2016-12-28 15:43 -0800
References <akdkmp$5gc$1@news.u-strasbg.fr> <akdgd6$7fg$1@nets3.rz.RWTH-Aachen.DE> <e7a6f432-0e04-4782-aa40-4629d93494b9@googlegroups.com> <o3te7p$frn$1@solani.org>
Message-ID <7a234a12-d161-400a-9f1b-633aea70b392@googlegroups.com> (permalink)
Subject Re: Intersection point of data-plot and linear-function
From Markus Grünwald <m_grueni@web.de>

Show all headers | View raw


Am Dienstag, 27. Dezember 2016 11:02:35 UTC+1 schrieb Karl Ratzsch:
> Am 27.12.2016 um 00:13 schrieb Markus Grünwald:
> > Just to be sure (because i need the same thing - and maybe there were lot 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=k*x+d)?
> > 
> 
> 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 estimated - with a few iterative runs i'll get a quite good approximation:

[code]
F_max_x=###
g1(x) = k1*x + d1
g2(x) = k2*x + d2
k1=###; d1=###
fit [F_max_x-0.25:F_max_x+0.25] g2(x) "DATA.txt" using 1:2 via k2,d2
F_max_x=(d2-d1)/(k1-k2); F_max=k1*F_max_x+d1
[/code]

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

Intersection point of data-plot and linear-function Markus Grünwald <m_grueni@web.de> - 2016-12-26 15:13 -0800
  Re: Intersection point of data-plot and linear-function Karl Ratzsch <mail.kfr@gmx.net> - 2016-12-27 11:02 +0100
    Re: Intersection point of data-plot and linear-function Markus Grünwald <m_grueni@web.de> - 2016-12-28 15:43 -0800

csiph-web