diff scripts/specfun/legendre.m @ 11415:e7ed20f87e82

Add @tex blocks to gammainc and legendre docstrings.
author Michael Godfrey <godfrey@isl.stanford.edu>
date Sun, 26 Dec 2010 21:28:20 -0800
parents be55736a0783
children 1740012184f9
line wrap: on
line diff
--- a/scripts/specfun/legendre.m	Sat Dec 25 07:47:50 2010 -0800
+++ b/scripts/specfun/legendre.m	Sun Dec 26 21:28:20 2010 -0800
@@ -33,6 +33,12 @@
 ##
 ## The Legendre Function of degree @var{n} and order @var{m}:
 ##
+## @tex
+## $$
+## P^m_n(x) = (-1)^m (1-x^2)^{m/2}{d^m\over {dx^m}}P_n (x)
+## $$
+## @end tex
+## @ifnottex
 ## @example
 ## @group
 ##  m        m       2  m/2   d^m
@@ -40,10 +46,17 @@
 ##  n                         dx^m   n
 ## @end group
 ## @end example
+## @end ifnottex
 ##
 ## @noindent
 ## with Legendre polynomial of degree @var{n}:
 ##
+## @tex
+## $$
+## P(x) = {1\over{2^n n!}}\biggl({d^n\over{dx^n}}(x^2 - 1)^n\biggr)
+## $$
+## @end tex
+## @ifnottex
 ## @example
 ## @group
 ##           1     d^n   2    n
@@ -51,6 +64,7 @@
 ##  n      2^n n!  dx^n
 ## @end group
 ## @end example
+## @end ifnottex
 ##
 ## @noindent
 ## @code{legendre (3, [-1.0, -0.9, -0.8])} returns the matrix:
@@ -73,6 +87,12 @@
 ##
 ## For Legendre functions of degree n and order 0:
 ##
+## @tex
+## $$
+## SP^0_n (x) = P^0_n (x)
+## $$
+## @end tex
+## @ifnottex
 ## @example
 ## @group
 ##   0       0
@@ -80,9 +100,16 @@
 ##   n       n
 ## @end group
 ## @end example
+## @end ifnottex
 ##
 ## For Legendre functions of degree n and order m:
 ##
+## @tex
+## $$
+## SP^m_n (x) = P^m_n (x)(-1)^m\biggl({2(n-m)!\over{(n+m)!}}\biggl)^{0.5}
+## $$
+## @end tex
+## @ifnottex
 ## @example
 ## @group
 ##   m       m          m    2(n-m)! 0.5
@@ -90,6 +117,7 @@
 ##   n       n               (n+m)!
 ## @end group
 ## @end example
+## @end ifnottex
 ##
 ## If the optional argument @var{normalization} is @code{"norm"}, 
 ## compute the fully normalized associated Legendre function.
@@ -98,6 +126,12 @@
 ##
 ## For Legendre functions of degree @var{n} and order @var{m}
 ##
+## @tex
+## $$
+## NP^m_n (x) = P^m_n (x)(-1)^m\biggl({(n+0.5)(n-m)!\over{(n+m)!}}\biggl)^{0.5}
+## $$
+## @end tex
+## @ifnottex
 ## @example
 ## @group
 ##   m       m          m    (n+0.5)(n-m)! 0.5
@@ -105,6 +139,7 @@
 ##   n       n                   (n+m)!    
 ## @end group
 ## @end example
+## @end ifnottex
 ## @end deftypefn
 
 ## Author: Marco Caliari <marco.caliari@univr.it>