legpoly()
ΒΆ
Create polynomial in the Legendre basis to use with QUINOPT.
Syntax: |
|
---|---|
Description: | creates a polynomial
\[P(x) = C_1\,\mathcal{L}_0[z(x)] + C_2\,\mathcal{L}_1[z(x)] + \cdots + C_{{\rm DEG}+1}\,\mathcal{L}_{\rm DEG}[z(x)]\]
where \(\mathcal{L}_n(z)\) is the Legendre polynomial of degree \(n\). Since Legendre polynomials are defined over the standard domain \([-1,1]\), the original independent variable \(x\) with domain \([a,b]\) is rescaled to
The input |
Syntax: | [P,C] = legpoly(x,DEG) |
---|---|
Description: | also returns the Legendre coefficients of the polynomials in the vector C . These are YALMIP variables (class sdpvar ). The coefficients in C are listed in order of increasing degree of the corresponding Legendre polynomial (see above). |
Syntax: | P = legpoly(x,DEG,COEF) |
---|---|
Description: | creates a polynomial P expressed in Legendre basis whose coefficients are specified by COEF . COEF can be a numeric/sdpvar vector, or an \(M\times N\) cell array whose entries are numeric/sdpvar vectors. When COEF is a cell array, an \(M\times N\) matrix of Legendre polynomials is created such that the coefficients of the entry P(i,j) are given by COEF{i,j} . |
Syntax: | [P,C] = legpoly(x,DEG,M,N) |
---|---|
Description: | creates an \(M\times N\) matrix of
Legendre polynomials of degree DEG . The output C , containing the coefficients of each entry of P , is optional. |