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:
531 bytes
|
Rev | Line | |
---|
[4] | 1 | function pass = complexrotation |
---|
| 2 | |
---|
| 3 | % LNT 20 May 2008 |
---|
| 4 | % This code makes sure a few things are ok if you make them complex |
---|
| 5 | |
---|
| 6 | f = chebfun(@(x) exp(x)); |
---|
| 7 | fi = chebfun(@(x) 1i*exp(x)); |
---|
| 8 | g = chebfun('1./(2-x)'); |
---|
| 9 | gi = chebfun('1i./(2-x)'); |
---|
| 10 | A = [f g]; |
---|
| 11 | |
---|
| 12 | pass1 = (sum(fi)==1i*sum(f)); |
---|
| 13 | pass2 = norm(fi)==norm(f); |
---|
| 14 | pass3 = abs((f'*g)-((1i*f)'*(1i*g))) < 1e-15; |
---|
| 15 | pass4 = (norm(gi,inf)-norm(g,inf)) < 1e-15; |
---|
| 16 | pass5 = (norm(fi,1)-norm(f,1)) < 1e-15; |
---|
| 17 | pass6 = norm(svd(A) - svd(1i*A)) < 1e-15; |
---|
| 18 | |
---|
| 19 | pass = pass1 && pass2 && pass3 && pass4 && pass5 && pass6; |
---|
| 20 | |
---|
| 21 | |
---|
Note: See
TracBrowser
for help on using the repository browser.