How to do linear interpolation (to find velocity function)

Hi. I have problem regarding linear interpolation. I have to find what is the function of U(eta), V(eta) and W(eta). My sv told me to do linear interpolation but I am not sure how to do it. Can someone help me regarding this? The details are as below:
- I already solve the non-linear ODE system which consist of 4 equations. the results is in the form of values from eta 0-20. meaning, i got values of U(0)-U(20), V(0)-V(20) and W(0)-W(20). - So now i have to find what is the function of U(eta), V(eta) and W(eta) based on interpolation with chebyshev polynomials. - My sv give me one clue which i have to use interp1. i have tried finding the examples but none of them are helping.
So can someone help me?

댓글 수: 3

Torsten
Torsten 2015년 12월 7일
편집: Thorsten 2015년 12월 7일
As far as I know, Chebyshev polynomials are for approximation, not interpolation.
So first clarify you want to do: linear interpolation or approximation with Chebyshev polynomials ?
Best wishes
Torsten.
Jan
Jan 2015년 12월 7일
편집: Stephen23 2015년 12월 7일
@day day: Please use standard Matlab syntax to describe the problem. What exactly is "U(0)-U(20)"? Linear interpolation and interpolation by Chebyshev polynomials are two diffrerent things. So please explain more exactly, what you have and what you want to achieve.
Also, you say that you need to use chebyshev polynomials,but you also claim you need to use interp1. Interp1 does NOT do chebyshev, so you cannot have both.
And interpolation using chebyshev polynomials is not in general a good idea anyway. Any high order polynomial interpolation is a usually a bad thing. And if you don't know what you are doing, and WHY you would do that, it is surely a bad thing.
So, read the help for interp1. There are examples included. This is a very easy code to use. TRY IT!

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

답변 (0개)

카테고리

질문:

2015년 12월 7일

편집:

2015년 12월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by