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


Groups > comp.graphics.apps.gnuplot > #2587 > unrolled thread

fitting points

Started bymrossgatt@gmail.com
First post2014-09-21 22:24 -0700
Last post2014-09-22 20:07 +0200
Articles 2 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  fitting points mrossgatt@gmail.com - 2014-09-21 22:24 -0700
    Re: fitting points Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2014-09-22 20:07 +0200

#2587 — fitting points

Frommrossgatt@gmail.com
Date2014-09-21 22:24 -0700
Subjectfitting points
Message-ID<eb1da355-00d0-4738-b595-8cbac13d9cd5@googlegroups.com>
Given data points in 2D, I want to generate a curve which interpolates these points. The points should generate a closed curve, i.e. for one x-value I have 2 y-coordinates. 

I already tried the function -plot "data.dat" smooth- with different options but always ended in some problems.
Smooth bezier: approximates the data
Smooth splines: interpolates the data and sometimes the resulting curve oscillates. Furthermore the curve cannot be interpolated at once since the data points are sorted by the x-coordinate before fitting. 

Do you have any other suggestions?

Thanks!
Martha

[toc] | [next] | [standalone]


#2590

FromHans-Bernhard Bröker <HBBroeker@t-online.de>
Date2014-09-22 20:07 +0200
Message-ID<c8b6poFjtjfU1@mid.dfncis.de>
In reply to#2587
Am 22.09.2014 um 07:24 schrieb mrossgatt@gmail.com:
> Given data points in 2D, I want to generate a curve which
> interpolates these points. The points should generate a closed curve,
> i.e. for one x-value I have 2 y-coordinates.

First, I'm afraid we have to clarify some terminology.  You mix up 
"fitting" with "interpolation".  Those are two different things.

I don't think gnuplot has any interpolator that will generate a closed 
curve.  You'll have to look elsewhere, or roll your own.

If at all, you might succeed by using 'table' output mode to calculate 
and save individually interpolated curves per input column, then join 
those back together externally, and plot the result.  Even this will 
still not have a truly cyclic set of boundary conditions (i.e. the curve 
won't close nicely).

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web