Navigation

Operators and Keywords

Function List:

C++ API

legendre.m File Reference


Functions

 if (nargin< 2||nargin > 3) print_usage()
endif if (nargin==3) normalization
 if (!warned_overflow) if(any(abs(lpm3a) > realmax)||any(abs(lpm3b) > realmax)||any(abs(lpm3) > realmax)) overflow
endif endif endfor retval (m,:)
 if (strcmp(normalization,"unnorm")) scale
endfor retval (n+1,:)
 if (strcmp(normalization,"sch")) retval(1

Variables

function retval
else normalization = "unnorm"
endif if(!isscalar(n)||n
< 0||n!=fix(n)) error("legendre
endswitch 
scale = scale * ones (1, numel (x))
 overflow = false
for m
 lpm2 = (2*m-1) .* x .* scale
 lpm3 = lpm2
for k
 lpm3b = (k+m-2) .* lpm1
 lpm1 = lpm2
 __pad14__
 __pad15__

Function Documentation

if ( strcmp(normalization,"sch")   ) 

if ( strcmp(normalization,"unnorm")   ) 

if ( warned_overflow  ) 

endif if ( nargin  = =3  ) 

if ( nargin< 2||nargin 3  ) 

endfor retval ( n+  1,
 
)

endif endif endfor retval ( ,
 
)


Variable Documentation

for k

Initial value:

 m+1:n
      lpm3a = (2*k-1) .* x .* lpm2

lpm2 = (2*m-1) .* x .* scale

lpm3b = (k+m-2) .* lpm1

for m

Initial value:

 1:n
    lpm1 = scale

else normalization = "unnorm"

overflow = false

function retval

Initial value:

 legendre (n, x, normalization)

  persistent warned_overflow = false

endif scale = scale * ones (1, numel (x))