开发者

Searching for TableCurve like, prebuilt list of functions and tools, to add to Mathematica

I'm searching for tablecurve functionalities on Mathematica.

I like a lot the functionalities of tablecurve 2d and 3d. When looking for a function that doesn’t need any sort of "physical" justi开发者_如何学运维fication to a given set of data, having thousands of predefined functions and an adjustment function that takes just a couple of seconds (literally) is very handy.

http://www.sigmaplot.com/products/tablecurve2d/tablecurve2d.php (There’s a trial, if you want to try it)

Does someone ever heard of any attempt to do the same in Mathematica? If I'm not mistaken, M8 has a lot of functionalities that would make this kind of program approach easy to establish (thought I'm not a specialist in this area). And once the basic functionality was set, one would just add more functions to a list, and then the adjustment of a data set to all the functions on that list would be launched, managed, sorted, etc, by the main package.

Can someone help me? Point an already existing package, or Give a small code to launch an adjustment on a set of functions, or Etc Thank you, P Fonseca


A basic recipe might be something along the following lines:

ClearAll[a, b, c, data]
data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}, {6, 4}, {7, 5}};

functions =
  {
   {Log[a + b x^2], {a, b}},
   {Sin[a x], {a}},
   {1 + a x + b x^2 + c x^3, {a, b, c}}
  };

Sort[
 Table[
  nlm = NonlinearModelFit[data, functions[[i, 1]], functions[[i, 2]],x];
  {nlm["AdjustedRSquared"], nlm["BestFit"]},
  {i, Length[functions]}
  ], #1[[1]] > #2[[1]] &
 ]

==> {{0.974277, 1 - 0.996311 x + 0.541669 x^2 - 0.0461196 x^3}, 
     {0.93636, Log[1.50632 + 1.42633 x^2]}, {-0.0304978, Sin[1.23596 x]}}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜