Code covered by the BSD License  

Highlights from
Chebpack

image thumbnail

Chebpack

by

 

15 Jul 2011 (Updated )

The MATLAB package Chebpack solves specific problems for differential or integral equations.

fact_ex1(N,dom,kind)
function fact_ex1(N,dom,kind)   
% Calculates cosh(X) using fact and funm from Matlab
% use: fact_ex1(32,[2,3],2)
%
x = pd(N,dom,kind);X=mult(N,dom); 
c = x2t(cosh(x),kind); 
display('fact');tic;CH=fact(c(:,1),N);toc;
display('funm');tic;Ec=funm(full(X),@cosh);toc;
e=x2t(exp(x),kind);
display('The coefficients of exp(x).*cosh(x), | funm-x2t | fact-x2t |');
display([Ec*e-x2t(exp(x).*cosh(x),kind),CH*e-x2t(exp(x).*cosh(x),kind)]);

Contact us