MATLAB Answers

Chebishev polynomials, don't know how to use "chebpoly"

5 views (last 30 days)
Paul Rogers
Paul Rogers on 14 May 2020
Answered: Paul Rogers on 17 May 2020
I wrote the following code to approximate a 2 variables function:
clear
clc
close all
FlowMeasurements = chebpts(5,[-0.2,0.8]); % mass flow Chebyshev
SpeedMeasurements = chebpts(5,[25000, 55000]); %Rotational speed Chebyshev
CompressorMapMatrix =[
1.5805 1.2092 1.1402 1.0234 1.0095
1.6553 1.2840 1.2564 1.0565 1.0287
1.9070 1.5357 1.7124 1.2518 1.1505
2.2873 1.9160 2.4317 1.7374 1.4732
2.4935 2.1222 2.8189 2.0728 1.7064]; % I put the points Chebishev will ask
FlowVector = -0.2:0.01:0.8;
approximationResult = chebfun2(CompressorMapMatrix,[ -0.2 0.8 25000 55000]);
a = chebcoeffs2(approximationResult); %a_ij Matrix
for i=1:length(SpeedMeasurements)
figure(2)
plot(approximationResult(FlowVector, SpeedMeasurements(i)));
hold on
grid on
end
Now I have to write this equation:
I have the a_ij Matrix, but I don't know how to get the:
I know for sure I have to use chebpoly but I don't know how.
This maybe could help:
https://www.chebfun.org/docs/guide/guide04.html

  0 Comments

Sign in to comment.

Answers (2)

Paul Rogers
Paul Rogers on 14 May 2020
maybe this can help
By Chebyshev points we shall mean the set of points in [1,1] defined by
xj=cos(jπ/N), 0jN,
where N1 is an integer. (If N=0, we take x0=0.) A fuller name is that these are Chebyshev points of the second kind. (Chebfun also enables computations based on Chebyshev points of the first kind; see Section 8.9.) Through any data values fj at these points there is a unique polynomial interpolant p(x) of degree N, which we call the Chebyshev interpolant. In particular, if the data are fj=(1)nj, then p(x) is TN(x), the degree N Chebyshev polynomial, which can also be defined by the formula TN(x)=cos(Ncos1(x)). In Chebfun, the command chebpoly(N) returns a chebfun corresponding to TN, and poly returns coefficients in the monomial basis 1,x,x2,. Thus we can print the coefficients of the first few Chebyshev polynomials like this:
taken from here

  0 Comments

Sign in to comment.


Paul Rogers
Paul Rogers on 17 May 2020
Can anyone help me on how to find T_i and T_j?

  0 Comments

Sign in to comment.

Tags

Products


Release

R2014b

Community Treasure Hunt

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

Start Hunting!