Derive equation from set of data
7 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!