I have 13*25 datasets consisting each of around 40 points. They are all linear I can easily fit them using fit function but my problem is when I want to call them I want them to be functions. I want to define a function using fit results
something like
Radius[s1,s2,o,i]=Fit[data[s1,s2,o],{1,x},x]
Do you have any idea how can I make this function?
any ideas?
Edit: My data is a set data of radius, {i,r(i)}
what are s1,s2 and o, Here it come in details if you are interested
s1 is site one on molecule one and s2 is site2 on molecule 2 an o is orientation meaning the way molecules can approach each other anyways in each case we will have different radiuses between these molecules and data[s1,s2,o] is a set of 40 points for example the picture is orientation one, data[1,7,1] will be 40 points of distance between atom 1 in molecule 1 and atom 7 in molecule 2.
{{1, 6.44479}, {2, 6.34609}, {3, 6.24742}, {4, 6.1488}, {5,
6.05023}, {6, 5.9517}, {7, 5.85322}, {8, 5.7548}, {9, 5.65642}, {10,
5.55811}, {11, 5.45986}, {12, 5.36167}, {13, 5.26356}, {14,
5.16551}, {15, 5.06754}, {16, 4.96965}, {17, 4.87185}, {18,
4.77414}, {19, 4.67652}, {20, 4.57901}, {21, 4.48161}, {22,
4.38432}, {23, 4.28716}, {24, 4.19013}, {25, 4.09325}, {26,
3.99652}, {27, 3.89995}, {28, 3.80356}, {29, 3.70736}, {30,
3.61137}}
the first iterator is the step number, meaning by each step molecules get closer to each other. Thanks for your attention
i
simply an index or is it an independent variable? What makes the relationship between i and r(i) linear? $\endgroup$