>  Docs Center  >  Libraries  >  ASTROLIB  >  TRANSFORM_COEFF
Libraries

TRANSFORM_COEFF

TRANSFORM_COEFF

Name


    TRANSFORM_COEFF()

Purpose


    Compute new polynomial coefficients under a linear transformation

Explanation


    Suppose one has a (nonlinear) polynomial (similar to the POLY() function)
          y = C[0] + C[1]*x + C[2]*x^2 + C[3]*x^3 + ...
      and one has a linear transformation in X
          x = alpha*x' + beta
    This function computes the new polynomial coefficients under the linear
    transformation.

Calling Sequence


    newcoeff = TRANSFORM_COEFF( coeff, alpha, beta)

Inputs


    Coeff - vector of polynomial coefficients (as with POLY()). The
        degree of the polynomial is N_elements(coeff) - 1
    Alpha, Beta - numeric scalars defining the linear transformation in X

Outputs


    NewCoeff - Vector (same size as Coeff) giving the new polyomial
              coefficients

Example


    Suppose one has polynomial mapping a nonlinear distortion in the X
    direction of a spectrum
    y = 0.2 + 1.1*x + 0.1*x^2
    if one rebins the spectrum to half the size then the linear transformation
    is x = 2.*x'
    so alpha = 2 and beta = 0
    The new coefficients are
    IDL> print, transform_coeff([0.2,1.1,0.1],2.,0)
    ==> [0.2, 2.2, 0.4]

Method


    Performs a binomial expansion of the polynomial and collect like terms
    groups.google.com/group/comp.lang.idl-pvwave/msg/11132d96d9c0f93d?hl=en&

Revision History


  Written W. Landsman December 2007



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us