Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 27
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
Nicko (57)


Next birthdays
04/20 gentoo_daemon (43)
04/21 kilovolt (50)
04/21 wannabegeekTC (50)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

Are there math programs to do this.

1 2 
Move Thread LAN_403
Patrick
Sun Apr 03 2016, 08:57PM Print
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Are there math programs that can take a series of already known X,Y coordinates and turn them into a common f(x) function ?
Back to top
Bored Chemist
Sun Apr 03 2016, 09:12PM
Bored Chemist Registered Member #193 Joined: Fri Feb 17 2006, 07:04AM
Location: sheffield
Posts: 1022
You can do it in excel.
But you need to have some idea what form to use for f(x)
For example, if you tell it to, excel will blindly try to fit a sine wave to a straight line.

What are you trying to achieve?
Back to top
Patrick
Sun Apr 03 2016, 09:48PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
if I have a concave up trending group of points, id like to derive a f(x). the more points I guess the better, which I can do, but still need a function.
Back to top
Blackcurrant
Sun Apr 03 2016, 10:10PM
Blackcurrant Registered Member #2989 Joined: Sun Jul 11 2010, 12:01AM
Location: UK
Posts: 94
see the bit on software half way down
Link2

or try looking for polynomial curve fitting
Back to top
2Spoons
Mon Apr 04 2016, 12:25AM
2Spoons Registered Member #2939 Joined: Fri Jun 25 2010, 04:25AM
Location:
Posts: 615
As Bored Chemist said, you still need to have some idea of the underlying function, which should be simple to find if you understand the process thats generating your data points. e.g fitting a polynomial to something fundamentally exponential may be reasonable within the bounds of your measured data, but its likely to be poor near the edges, and hopeless for extrapolation.
Back to top
Bjørn
Mon Apr 04 2016, 09:58AM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
Link2 can fit some types of functions to a data series.
Back to top
Carbon_Rod
Tue Apr 05 2016, 05:08AM
Carbon_Rod Registered Member #65 Joined: Thu Feb 09 2006, 06:43AM
Location:
Posts: 1155
Eureqa
"Eureqa is a mathematical software tool originally created by Cornell's Creative Machines Lab and later commercialized by Nutonian, Inc. The software uses symbolic regression to determine mathematical equations that describe sets of data in their simplest form."
( Link2 )

This program did a bit more than simple curve fitting, but now appears to be commercial use only.
Link2

... it's likely easier to use iterative curve fitting scripts in octave or Matlab...
Link2
Back to top
flannelhead
Tue Apr 05 2016, 07:04PM
flannelhead Registered Member #952 Joined: Mon Aug 13 2007, 11:07AM
Location: Finland
Posts: 388
gnuplot can do nonlinear fitting as well, but you'll still need to give the function to fit to the data.
Back to top
klugesmith
Tue Apr 05 2016, 09:51PM
klugesmith Registered Member #2099 Joined: Wed Apr 29 2009, 12:22AM
Location: Los Altos, California
Posts: 1716
Does your data set have redundant X values?
If not, then you can fit it perfectly with a continuous piecewise linear function. smile
AKA linear interpolation. Not hard to write from scratch in Excel, and useful in many practical cases.
Back to top
Dr. Slack
Thu Apr 07 2016, 08:23PM
Dr. Slack Registered Member #72 Joined: Thu Feb 09 2006, 08:29AM
Location: UK St. Albans
Posts: 1659
Curve fitting in the general case is an art, not a science.

It's possible to find families of curves that will fit any function. Given the curves, there are efficient ways to get a least squares best fit. Least squares minimises the energy of the errors between the data points and their approximation. Such families include Polynomials (Taylor series), Chebychev functions, sine waves (Fourrier analysis), and any number of others. The art comes from choosing a suitable family, and a suitable order.

Given a curve family to work from, a reasonable way to get to the appropriate order is to fit at several orders starting at the lowest, measuring the error energy for each order. You may see a sudden dip in energy, or you may have a maximum error energy criterion. In any case, an order larger than the square root of the number of data points is unlikely to be a good fit, as it will be likely to be over-fitting, that is fitting the noise.

Any family of curves can approximate any other curve, given sufficient order. However, if the approximating function is a good match for the actual curve, the needed order can be dramatically lower. It is often worth experimentally adding a curve from a different family into the approximation functions to see whether the error improves. A curve might well show a good fit to a.x+b.ln(x)+c.sin(x)+d for instance.

Some curves, a histogram of measurement results, or the intensity of a broadened optical line, can be well fitted by a normal, where the centre position, width and height can be adjusted iteratively.

A program can be written to try combinations of supplied functions. AI to go quickly to the best functions is probably an interesting PhD thesis, one that might perform as well as an experienced mathematician who looks at the data and says 'I reckon a tan plus a couple of normals would look good there!'
Back to top
1 2 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.