source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/subspacetest.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 506 bytes
Line 
1function pass = subspacetest
2% test the subspace function (angle between subspaces). Also calls vander.m
3% Rodrigo Platte, October 2008.
4
5pass = true;
6[d,theta] = domain(0,2*pi);
7A = [vander(exp(-1i*theta), 3) vander(exp(1i*theta), 2)];
8f = sin(10*theta); f = f/norm(f);
9A(:,1) = A(:,1)/norm(A(:,1));
10alpha = [1e-12 pi/6 pi/3 pi/2-1e-12];
11for k = 1:length(alpha)
12    B = cos(alpha(k))*A(:,1)+sin(alpha(k))*f;
13    angle = subspace(A,B);
14    pass = pass && (abs(angle-alpha(k)) < 1e4*chebfunpref('eps'));
15end
Note: See TracBrowser for help on using the repository browser.