About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • License: Freeware
  • Last update: 6 years ago
  • Total downloads: 138
  • Price: Free |
  • Operating system: Linux, Mac OS X, Win All, Solaris
  • Publisher: Daniel Baboiu
See full specifications

scripts default iconLegendre polynomials (Scripts) Publisher's description

The built-in legendre() calculates the Legendre polynomials calculated ALL the orders for a given degree

The built-in legendre() calculates the Legendre polynomials calculated ALL the orders for a given degree. If you only need a given order, this is a waste of memory and computing time (especially for large blocks of data). The function legendreP(l,m,x) is a drop-in substitute for legendre(l,x), except that it only calculates the required order.

The polynomial coefficients are calculated analytically from the Rodrigues' formula, To further optimize the computation of coefficients (significant for small data sets), the coefficients are computed recursively from earlier coefficients (to avoid computing multiple factorials). The polynomial is computed using exactly l/2 multiplications and additions for any structure of the data array x.

The polynomial coefficients for first 3 degrees were checked manually against the exact values. The numerical returns were checked for every order for all degrees up to m using an array of size 128^1, filled with random numbers between -1 and 1; the difference compared with the built-in were within numerical errors (relative error ~1e-15). Some of the orders were checked for all degrees up to l=20 as well.

This function is much faster than the built in, especially for larger degrees; for 100^3 array, the built-in legendre(8,x) takes about 9.5 sec, while legendreP(8,6,x) takes only 0.15sec. Even calculating all 9 orders takes only about 0.15 sec.

There is no error checking (e.g., 0<=m<=l and |x|<=1), and no additional scaling is done (e.g., Schmidt), but these should not affect significantly the run time.Uses only standard matlab features, should work with any version of matlab; tested on 2008b, 2009b, 2010a.

System Requirements:

MATLAB 7.7 (R2008b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

Legendre polynomials (Scripts) Tags:

Click on a tag to find related softwares

Is Legendre polynomials (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.