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

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

Initial import--MML version from SOLEIL@2013

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