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:
490 bytes
|
Line | |
---|
1 | function pass = scaleinvariance |
---|
2 | |
---|
3 | % LNT 20 May 2008 |
---|
4 | % This code makes sure a few things are scale-invariant. |
---|
5 | |
---|
6 | d = [1 2]; |
---|
7 | scale = 2^300; |
---|
8 | f = chebfun(@(x) exp(x),d); |
---|
9 | maxf = max(f); |
---|
10 | |
---|
11 | f1 = chebfun(@(x) exp(x*scale),d/scale); |
---|
12 | pass1 = (max(f1)==maxf); |
---|
13 | |
---|
14 | f2 = chebfun(@(x) exp(x/scale),d*scale); |
---|
15 | pass2 = (max(f2)==maxf); |
---|
16 | |
---|
17 | f3 = chebfun(@(x) exp(x)*scale,d); |
---|
18 | pass3 = (max(f3)==maxf*scale); |
---|
19 | |
---|
20 | f4 = chebfun(@(x) exp(x)/scale,d); |
---|
21 | pass4 = (max(f4)==maxf/scale); |
---|
22 | |
---|
23 | pass = pass1 && pass2 && pass3 && pass4; |
---|
24 | |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.