Derive equation from set of data

조회 수: 7 (최근 30일)
Stephen
Stephen 2012년 3월 16일
I feel rather silly asking this as I'm sure it's extremly simple and that I'm missing a button or something but can't find the answer so thought I'd ask you fine folk for some help :D
I've got two sets of data (y and x) in vector form. I can plot them easy enough but I want to find an equation for the graph those sets of data produce. Like I said I expect it's actually really simple to do... but for the life of me I can't work it out :s
Help is (as always) much appretiated :D

채택된 답변

Walter Roberson
Walter Roberson 2012년 3월 16일
There are literally an infinite number of equations that would fit the data perfectly. There is no mathematical way to say that one of them is "right" and the others are "wrong"; one of them is as good as any other.
Unless, that is, you already know what the form of the equation has to be. If you know the form of the equation, it might be possible to use curve fitting (such as from the Curve Fitting Toolbox) to optimize the parameters of the curve for a good fit.
Note: A polynomial fit of degree 10 or more is almost certainly a numerical mistake. Even 10 is quite dubious.
  댓글 수: 1
Stephen
Stephen 2012년 3월 16일
I'm now trying the polyfit. Basicly it's a short amount of points that make up the outside of a NACA aerofoil (so when it's run it plots the shape of the aerofoil). There are already formula for doing that, HOWEVER I'm also wanting to do it with flap deflection for which I can't find any formula. So I'm using a program which will give me the points to plot and I'm trying to get an equation which fits so that I can use that in my code to do some calculations.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by