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