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


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

Re: linear fit of looped (and cutted) data set

X-Received by 10.99.101.196 with SMTP id z187mr8910697pgb.153.1480287402264; Sun, 27 Nov 2016 14:56:42 -0800 (PST)
X-Received by 10.157.8.134 with SMTP id 6mr459824otf.17.1480287402180; Sun, 27 Nov 2016 14:56:42 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!n6no2025155qtd.0!news-out.google.com!m27ni3472qtf.1!nntp.google.com!n6no2025150qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.graphics.apps.gnuplot
Date Sun, 27 Nov 2016 14:56:41 -0800 (PST)
In-Reply-To <o1fc4s$bo2$1@dont-email.me>
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 <4ad61db7-dd62-4b0f-8bb6-ffa3305505fb@googlegroups.com> <o1fc4s$bo2$1@dont-email.me>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <aa2bf3fc-6c30-42a9-ab4b-d04c2dece171@googlegroups.com> (permalink)
Subject Re: linear fit of looped (and cutted) data set
From Markus Grünwald <m_grueni@web.de>
Injection-Date Sun, 27 Nov 2016 22:56:42 +0000
Content-Type text/plain; charset=UTF-8
Xref csiph.com comp.graphics.apps.gnuplot:3488

Show key headers only | View raw


Am Sonntag, 27. November 2016 20:29:46 UTC+1 schrieb Ethan A Merritt:

> Looks like maybe you want to fit the first derivative of the
> trajectory rather than fitting the trajectory itself.

Good advice.

After little research and help of following blog https://stackoverflow.com/questions/15751226/how-can-i-plot-the-derivative-of-a-graph-in-gnuplot

if done following:
[code]
limitlo(x,lo) = (x > lo) ? x : 0/0
limithi(x,hi) = (x < hi) ? x : 0/0
limitlohi(x,lo,hi) = limitlo(limithi(x,hi),lo)
d2(x,y) = ($0 == 0) ? (x1 = x, y1 = y, 1/0) : (x2 = x1, x1 = x, y2 = y1, y1 = y, (y1-y2)/(x1-x2))

dx=.5; ylo=550; yhi=2500
fit [0:20] kwm "Data.txt" using ($2-dx):(d2($2,(limitlohi($3,ylo,yhi)))) via kwm
fm(x) = kwm*x + dwm
fit [0:20] [ylo:yhi] fm(x) "Data.txt" using 2:3 via dwm
[/code]

and now i got quite what i expected to.

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


Thread

linear fit of looped (and cutted) data set Markus Grünwald <m_grueni@web.de> - 2016-11-27 07:31 -0800
  Re: linear fit of looped (and cutted) data set Ethan A Merritt <EAMerritt@gmail.com> - 2016-11-27 11:29 -0800
    Re: linear fit of looped (and cutted) data set Markus Grünwald <m_grueni@web.de> - 2016-11-27 14:56 -0800
      Re: linear fit of looped (and cutted) data set [solved] Markus Grünwald <m_grueni@web.de> - 2016-12-26 14:52 -0800
  Re: linear fit of looped (and cutted) data set Karl Ratzsch <mail.kfr@gmx.net> - 2016-11-27 22:11 +0100

csiph-web