I am going to fit a data set in the following way. I have a data set $y$ vs. $x$. $y$ is again a function of $t$ i.e. $y=f(t)$. With varying $t$, I can get different $y$ and can plot $y$ vs. $x$, and fit each plot to find the fitting parameters. I need all the fitting parameters with varying $t$. I have used code like this:
dataf = Table[FindFit[data, a + b*i, {a, b}, i], {i, 1, 5}]
This does not work. I don't understand how to express it? Please help.
data
? Do you mean that your model looks likey[[i]] = f(x[[i]],t)
with listsx
andy
prescribed andt
being a further parameter? $\endgroup$y[[i]] == f[x[[i]], t]
). $\endgroup$i
serving two different roles here. You're tellingFindFit
that it's the independent variable in the fitting formula, but then you're trying to use it as aTable
index, too. I can't understand what you're attempting. $\endgroup$