An efficient Lagrange interpolation algorithm for multi-variate problems
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Xiaohan Du
am 28 Nov. 2016
Beantwortet: Vishal Neelagiri
am 6 Dez. 2016
Hi all,
I'd like to perform a multi-variate Lagrange interpolation for matrices. Here is a simple example:
Imagine there are 4 points in a Cartesian coordinate system:
coord = [1 1; 1 2; 2 1; 2 2];
and related four 2 by 2 matrices:
samp_1 = [1 2; 3 4];
samp_2 = [2 3; 4 5];
samp_3 = [1 3; 5 7];
samp_4 = [2 4; 6 8];
Therefore applying Lagrange polynomials, the result of interpolation at point [1.5, 1.5] is
otpt = [1.5 3; 4.5 6];
Similarly, the results at point [1.8, 1.3] is
otpt = [1.3 3.1; 4.9; 6.7];
Is there a code in MATLAB to achieve this (for any size of matrices)? I have my own solution but it is not very efficient, and it needs to perform matrix inverse, which takes time. I'd like to hear your ideas.
Many thanks!
0 Kommentare
Akzeptierte Antwort
Vishal Neelagiri
am 6 Dez. 2016
You might find the following File Exchange submission and the MATLAB Answers page helpful regarding this:
https://www.mathworks.com/matlabcentral/answers/3338-lagrange-interpolation-m
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!