% lagguere.m % %% return the old Lagguerre polynomial %% k,j must be integers, r must be a string %% Built to emulate the REDUCE procedure: %%% procedure lagguere(k,j,r); %%% begin scalar secder, deriv; %%% deriv:=e^r * df(r^k * e^(-r),r,k); %%% secder:=df(deriv,r,j); %%% return secder %%% end; function secder = lagguere(k,j,r) % % deriv=exp(r) * df(r^k * exp(-r),r,k); str1=[ r '^' num2str(k) ' * exp(-' r ')']; deriv=[ 'exp(' r ') * (' df(str1,r,k) ')'] ; deriv=simplify(deriv); % the next is as in Reduce: secder=df(deriv,r,j);