Matlab legendre emulation function
P = mtlb_legendre(n,X)
P = mtlb_legendre(n,X[,normflag])
:X a scalar, vector, matrix or hypermatrix with elements in [-1,1] :
:n a positive scalar integer :
:normflag a string (‘sch’ or ‘norm’) :
Matlab and Scilab legendre behave differently in some particular cases:
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:
Caution: mtlb_legendre has not to be used for hand coded functions.