source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/ivptestcomplex.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: 390 bytes
Line 
1function pass = ivptestcomplex
2
3% Nick Trefethen March 2009
4% This routine testss ode45, ode113, ode15s on a complex ode to
5% make sure we get the signs right
6
7f = @(x,u) 1i*u;
8d = domain(0,1);
9
10y = ode113(f,d,1);
11pass1 = abs(y(1)-exp(1i)) < 2e-2;
12
13y = ode45(f,d,1);
14pass2 = abs(y(1)-exp(1i)) < 2e-2;
15
16y = ode15s(f,d,1);
17pass3 = abs(y(1)-exp(1i)) < 2e-2;
18
19pass = pass1 && pass2 && pass3;
20
21
Note: See TracBrowser for help on using the repository browser.