Home > Src > Basis_functions > pol_legendre.m

pol_legendre

PURPOSE ^

POL_LEGENDRE recursive construction of Legendre basis function

SYNOPSIS ^

function [lnp1]=pol_legendre(n,ln,lnm1)

DESCRIPTION ^

 POL_LEGENDRE  recursive construction of Legendre basis function
            formula (2.3.19), pag. 77, CHQZ2
   [lnp1]=pol_legendre(n,ln,lnm1)
            called by plot_legendre

 Input: n = polynomial degree
        ln = character expression of L_n(x)
        lnm1 = character expression of L_{n-1}(x)

 Output: lnp1 = character expression of L_{n+1}(x)

 Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
                    "Spectral Methods. Fundamentals in Single Domains"
                    Springer Verlag, Berlin Heidelberg New York, 2006.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [lnp1]=pol_legendre(n,ln,lnm1)
0002 % POL_LEGENDRE  recursive construction of Legendre basis function
0003 %            formula (2.3.19), pag. 77, CHQZ2
0004 %   [lnp1]=pol_legendre(n,ln,lnm1)
0005 %            called by plot_legendre
0006 %
0007 % Input: n = polynomial degree
0008 %        ln = character expression of L_n(x)
0009 %        lnm1 = character expression of L_{n-1}(x)
0010 %
0011 % Output: lnp1 = character expression of L_{n+1}(x)
0012 %
0013 % Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
0014 %                    "Spectral Methods. Fundamentals in Single Domains"
0015 %                    Springer Verlag, Berlin Heidelberg New York, 2006.
0016 
0017 %   Written by Paola Gervasio
0018 %   $Date: 2007/04/01$
0019 
0020 ns=num2str(n);
0021 lnp1=['(2*',ns,'+1)/(',ns,'+1).*x.*(',ln,')-',ns,'/(',ns,'+1).*(',lnm1,')'];
0022 return
0023

Generated on Fri 21-Sep-2007 10:07:00 by m2html © 2003