Code covered by the BSD License  

Highlights from
Chebfun V4

image thumbnail

Chebfun V4

by

 

30 Apr 2009 (Updated )

Numerical computation with functions instead of numbers.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

ad_qmdiff
function pass = ad_qmdiff
% Check if automatic differentiation of a quasimatrix with respect
% to the columns of another quasimatrix works.

d = [-1,1];
x = chebfun(@(x) x, d);
u = [ chebfun('x')  chebfun('x') ];
f = [ u(:,1)  x.*u(:,2) ];
A = diff(f,u);

A4 = full(A(4));

pass = sum(abs(diag(A4))) == 7;

Contact us