Last change
on this file was
17,
checked in by zhangj, 10 years ago
|
To have a stable version on the server.
|
-
Property svn:executable set to
*
|
File size:
506 bytes
|
Line | |
---|
1 | function pass = subspacetest |
---|
2 | % test the subspace function (angle between subspaces). Also calls vander.m |
---|
3 | % Rodrigo Platte, October 2008. |
---|
4 | |
---|
5 | pass = true; |
---|
6 | [d,theta] = domain(0,2*pi); |
---|
7 | A = [vander(exp(-1i*theta), 3) vander(exp(1i*theta), 2)]; |
---|
8 | f = sin(10*theta); f = f/norm(f); |
---|
9 | A(:,1) = A(:,1)/norm(A(:,1)); |
---|
10 | alpha = [1e-12 pi/6 pi/3 pi/2-1e-12]; |
---|
11 | for 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')); |
---|
15 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.