# MATLAB help: Interpolating an array of data to create a function

by McLaren Rulez
Tags: array, data, function, interpolating, matlab
 P: 2,251 polyfit()? http://www.mathworks.com/help/matlab/ref/polyfit.html the function x(t) will be a polynomial, so you may or may not like that. you may want to choose another function basis, like adding up exponentials to fit your data. you might want to apply polyfit() to the logarithm of your data and then exponentiate the result. there is an unlimited number of methods to fit a deterministic function to given data. another way of looking at it is that this $x(t)$ is ideally sampled (which means $x(t)$ was bandlimited before sampling) and the $x[n]$ in the array are the samples. then you want to do bandlimited reconstruction. it might look like: $$x(t) = \sum_{n==\infty}^{+\infty} x[n] \ \operatorname{sinc}((t - nT)/T)$$ where $$\operatorname{sinc}(u) = \frac{\sin(\pi u)}{\pi u}$$