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:
386 bytes
|
Line | |
---|
1 | function pass = vectornorms |
---|
2 | |
---|
3 | % Nick Trefethen 27 October 2008 |
---|
4 | |
---|
5 | f = chebfun(1,2,0:4:8); |
---|
6 | norms(1) = norm(f,1); |
---|
7 | norms(2) = norm(f,2); |
---|
8 | norms(3) = norm(f,inf); |
---|
9 | norms(4) = norm(f,'fro'); |
---|
10 | norms(5) = norm(f',1); |
---|
11 | norms(6) = norm(f',2); |
---|
12 | norms(7) = norm(f',inf); |
---|
13 | norms(8) = norm(f','fro'); |
---|
14 | s = sqrt(20); |
---|
15 | exact = [12 s 2 s 12 s 2 s]; |
---|
16 | pass = (norm(norms-exact,inf) < 1e-14*chebfunpref('eps')/eps); |
---|
Note: See
TracBrowser
for help on using the repository browser.