R/ultraspherical.weight.R

Defines functions ultraspherical.weight

Documented in ultraspherical.weight

ultraspherical.weight <- function( x, alpha )
{
###
### This function returns the value of the weight function
### for the ultraspherical polynomial, Ck( alpha, x )
###
### Parameters
### x = the function argument
### alpha = the polynomial parameter
###
    n <- length( x )
    y <- rep( 0, n )
    for ( i in 1:n ) {
        log.y <- ( alpha - 0.5 ) * log( 1 - x[i] * x[i] )
        y[i] <- exp( log.y )
    }
    return( y )
}

Try the orthopolynom package in your browser

Any scripts or data that you put into this service are public.

orthopolynom documentation built on Oct. 3, 2022, 5:08 p.m.