Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 6.1.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Funções de Compatibilidade > mtlb_legendre

# mtlb_legendre

Matlab legendre emulation function

### Calling Sequence

P = mtlb_legendre(n,X)
P = mtlb_legendre(n,X[,normflag])

### Arguments

X

a scalar, vector, matrix or hypermatrix with elements in [-1,1]

n

a positive scalar integer

normflag

a string ('sch' or 'norm')

### Description

Matlab and Scilab legendre behave differently in some particular cases:

• Scilab legendre(m,n,X) evaluates the legendre function of degree n and order n for the X elements. Matlab legendre(n,X) evaluates the Legendre functions of degree n and order m=0,1,...,n. (emulated by mtlb_legendre) for the X elements.

• The option normflag= 'sch' does not exist for Scilab legendre (emulated)

• If X is a hypermatrix then Scilab legendre(n,X) does not work (emulated)

The function mtlb_legendre(n,X[,normflag]) is used by mfile2sci to replace legendre(n,X[,normflag]) when it was not possible to know what were the inputs while porting Matlab code to Scilab. This function will determine the correct semantic at run time. If you want to have a more efficient code it is possible to replace mtlb_legendre call:

• If X is a scalar, a vector or a matrix mtlb_legendre(n,X[,'norm'])may be replaced by legendre(n,0:n,X[,'norm'])

 Caution: mtlb_legendre has not to be used for hand coded functions.

### Comments

Add a comment:
Please login to comment this page.

 Report an issue << mtlb_l Funções de Compatibilidade mtlb_linspace >>

 Scilab EnterprisesCopyright (c) 2011-2017 (Scilab Enterprises)Copyright (c) 1989-2012 (INRIA)Copyright (c) 1989-2007 (ENPC)with contributors Last updated:Thu Oct 02 13:57:51 CEST 2014