MATLAB: Matlab – convert vector to discrete function

matlab function

How can I convert a vector of real numbers to a discrete function dependent on other vector of real numbers:
U(i); i=1,2,3… —> U(x); x=[0.01,0.003,0.0036…]
*The desired function is the function I get from: >>plot(x,U); *The final goal is to integrate : U(j+1)=integral(U(x)*5^.x,-0.05,0.05);

Best Answer

You can fit a polynomial to U, or a spline or any function. We must know what the expected relation is, or at least see the graph to have a hope of figuring out the relationship.
Perhaps you could post an image of the plot.
You also can simply use TRAPZ without any fitting.