Equation to Matlab code
Afficher commentaires plus anciens
Can someone please help to me understand how the equation (eq. 47) and code given in the picture relate ?
Any hint or suggestion would be of great help.
In the equation c is the order of the polynomial.
Thank you.

5 commentaires
Rik
le 1 Août 2022
There are several algebraic steps between the two forms. The x seems to be substituted already.
I must admit I don't understand the mathematical description well enough to understand why the code is equivalent.
Torsten
le 1 Août 2022
I guess LPC(i,j) is the value of j-th coefficient of the i-th Legendre polynomial.
jessupj
le 1 Août 2022
i think OP needs to define what the intended domain is. there's no x anywhere here.
start with
x=linspace(0,1,25);
Jeffrey Clark
le 2 Août 2022
@Ajai Singh, @Torsten is correct - the LPC values are the computed multipliers for the x^(c-n) terms of the Legendre polynomials. So LPC(1,1) is the multiplier for the zero order Legendre polynomial, which is 1*x^0; similarly LPC(2,1:2) are the mulpliers for the 1st order polynomial 0*x^0 + 1*x^1. Check that the MATLAB code provided does compute the 2nd order polynomial multipliers when c = 3 to be LPC(3,1:3) = [-0.5 0 1.5] as in -0.5*x^0 + 0*x^1 + 1.5*x^2.
A table for the first 11 (0->10) can be seen in this article Legendre polynomials - Wikipedia
Note that MATLAB functions that operate on this short hand description of polynomials generally expects them in reverse order. See Polynomial roots - MATLAB roots (mathworks.com)
John D'Errico
le 2 Août 2022
Modifié(e) : John D'Errico
le 2 Août 2022
@jessupj - The Legendre polynomials from this family will be orthognal on the interval [-1,1], NOT [0,1]. In fact though, they could be evaluated on ANY interval, as they are still just polynomials. Some people choose to define the Legendre polynomials on the interval [0,1], which is entirely doable. But were you to do that, you would find a different family of polynomials. Regardless, you do not need to define what x is before you create any polynomials.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
