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 Comments

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.
@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!

Sign in to comment.

Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Asked:

on 7 Dec 2015

Edited:

on 7 Dec 2015

Community Treasure Hunt

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

Start Hunting!