Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

finding function by points Mathematica

I have two list x and y. I combine them and receive list of point {x,y}. Using ListLinPlot I build a graphic. My question is - Can I find the function using points? I mean find formula/function f(x) if I know only points. For an example :

{{2,5},{3,7},{7,15},{9,19}}

So the answer will be:

F(x)=2x+1

It was easy example, but my graphic is not a liner function. The blue line is my function. I changed picture that better describe the problem

enter image description here

like image 636
ZeroVash Avatar asked Jun 06 '26 06:06

ZeroVash


1 Answers

See https://reference.wolfram.com/language/ref/FindFormula.html

data = {{2, 5}, {3, 7}, {7, 15}, {9, 19}};
fit = FindFormula[data, x]
1. + 2. x
like image 182
Chris Degnen Avatar answered Jun 07 '26 22:06

Chris Degnen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!