Jacobi poly: Difference between revisions

From QETLAB
Jump to navigation Jump to search
Created page with "{{Function |name=jacobi_poly |desc=Computes the coefficients of Jacobi polynomials |upd=March 6, 2013 |v=1.00 |helper=1}} <tt>'''jacobi_poly'''</tt> is a [[List of functions|f..."
 
No edit summary
 
Line 2: Line 2:
|name=jacobi_poly
|name=jacobi_poly
|desc=Computes the coefficients of Jacobi polynomials
|desc=Computes the coefficients of Jacobi polynomials
|cat=[[List of functions#Helper_functions|Helper functions]]
|upd=March 6, 2013
|upd=March 6, 2013
|v=1.00
|v=0.50
|helper=1}}
|helper=1}}
<tt>'''jacobi_poly'''</tt> is a [[List of functions|function]] that returns a vector containing the coefficients of the specified [http://en.wikipedia.org/wiki/Jacobi_polynomials Jacobi polynomial].
<tt>'''jacobi_poly'''</tt> is a [[List of functions|function]] that returns a vector containing the coefficients of the specified [http://en.wikipedia.org/wiki/Jacobi_polynomials Jacobi polynomial].
Line 17: Line 18:
==Examples==
==Examples==
The Jacobi polynomials are typically denoted by the notation <math>P^{(\alpha,\beta)}_n</math>. In the <math>\alpha = \beta = 1, n = 3</math> case, we have <math>P^{(1,1)}_3(z) = 7z^3 - 3z</math>, which we can see via the following code:
The Jacobi polynomials are typically denoted by the notation <math>P^{(\alpha,\beta)}_n</math>. In the <math>\alpha = \beta = 1, n = 3</math> case, we have <math>P^{(1,1)}_3(z) = 7z^3 - 3z</math>, which we can see via the following code:
<pre>
<syntaxhighlight>
>> jacobi_poly(1,1,3)
>> jacobi_poly(1,1,3)


Line 23: Line 24:


     7    0    -3    0
     7    0    -3    0
</pre>
</syntaxhighlight>
 
{{SourceCode|name=jacobi_poly|helper=1}}

Latest revision as of 15:59, 29 September 2014

jacobi_poly
Computes the coefficients of Jacobi polynomials

Other toolboxes required none
Function category Helper functions
This is a helper function that only exists to aid other functions in QETLAB. If you are an end-user of QETLAB, you likely will never have a reason to use this function.

jacobi_poly is a function that returns a vector containing the coefficients of the specified Jacobi polynomial.

Syntax

  • JP = jacobi_poly(A,B,N)

Argument descriptions

  • A: A real parameter (sometimes called alpha) of the Jacobi polynomials.
  • B: A real parameter (sometimes called beta) of the Jacobi polynomials.
  • N: The degree of the Jacobi polynomial (a non-negative integer).

Examples

The Jacobi polynomials are typically denoted by the notation <math>P^{(\alpha,\beta)}_n</math>. In the <math>\alpha = \beta = 1, n = 3</math> case, we have <math>P^{(1,1)}_3(z) = 7z^3 - 3z</math>, which we can see via the following code:

>> jacobi_poly(1,1,3)

ans =

     7     0    -3     0

Source code

Click here to view this function's source code on github.