MATLAB Answers

2d Chebyshev polynomial interpolation

10 views (last 30 days)
Marko on 18 Feb 2021
Hello Community,
may i ask you for your help.
I have a full matrix M with the N+1 number of elments in each direction.
The x and y coordinates are the roots of the chebyshev polynomial (of the first kind).
My goal is to find an exact polynomail in x and y
I have achieved this in 1D with the following line:
[P, S, mu]=polyfit(x,y,N);
Here is an example of the data:
N = 8;
% define x and y as N+1 chebychev points
x = cos((0:N)*pi/N); y = x;
[X,Y] = meshgrid(x,y);
% define matrix M as dummy
M = sin(X*pi)+cos(pi*Y.^2);
How could I interpolate a 2D polynom in x and y?
If N = 1 the size of M is [2,2]. And I could youe a bilinear interpolation polynom:
a11 = f(1,1);
a12 = f(1,2)-f(1,1);
a21 = f(2,1)-f(1,1);
a22 = f(2,2)-(f(2,1)+f(1,2));
fBilinear = a11 +a12*x +a21*y +a22*x*y;
How could i extend this formula to N = 48 ?
Any help would be greatly appreciated.

Answers (0)


Community Treasure Hunt

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

Start Hunting!