Watch this Author's files
Great function, but because of not available even oder odd-function this function was not usable for newer versions of MATLAB.
I have changed for the section:
if Ordering == 'Noll'
the following three lines (old --> new):
ind = find(odd(n)); --> ind = find(mod(n,2));
ind = find(even(n)); --> ind = find(1-mod(n,2));
ind = find(even(p)); --> ind = find(1-mod(p,2));
Now it works within Matlab 7.6.0 (2008a).
Very great functions! But the normalization with the 'norm' - option seems to be wrong. I've changed in:
% For the normalized polynomials the line 177:
y(:,j) = y(:,j)*sqrt((1+(m(j)~=0))*(n(j)+1)/pi);
% I have to replaced by:
y(:,j) = y(:,j)*sqrt((n(j)+1));
y(:,j) = y(:,j)*sqrt(2*(n(j)+1));