开发者

How to draw best fit non linear curve in C#

after lots of timing searching on net I come back to Stack overflow.can anyone开发者_开发知识库 tell me where i will get code for drawing best fit nonlinear curves in c# or wpf & combine curves of linear curve & non linear curves.Thank you


You can use BezierSegment.

Plus some MSDN documentation.


You can fit an nth-order polynomial through n+1 points, using Polynomial Interpolation.

Programming it involves a little matrix arithmetic, since you end up solving a system of linear equations which you'd need to understand if you were going to write it from scratch.


Also have a look at Radial Basis Functions which fit curves very well. Whatever you do, you will need to use matrix algebra to solve a system of linear equations.


It seems to me you are asking for a programming answer to a mathematical question.

You need to elaborate on "best fit." That could mean a lot of different things depending on context. Do you have an underlying statistical model? Do you need a "tracking algorithm" that updates after each new point with minimum computation? Are you removing seasonality or some other regular perturbation?

The answer could be as varied as Fast Fourier Series and exponential smoothing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜