Matlab - convert vector to discrete 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);

댓글 수: 1

Babak
Babak 2012년 9월 5일
How come the first U has inputs of integer numbers but the second U has input of x? I mean what's the relation between x and i? You also need to mention what U is where is came from...

댓글을 달려면 로그인하십시오.

 채택된 답변

Matt Fig
Matt Fig 2012년 9월 5일
편집: Matt Fig 2012년 9월 5일

0 개 추천

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.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

질문:

2012년 9월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by