Mercurial > repos > public > sbplib
comparison +time/+rk/ButcherTableau.m @ 994:2f89959fb9f0 feature/timesteppers
Implement method to get gain from butcher tableu
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 09 Jan 2019 12:14:30 +0100 |
parents | 1066bb31bc95 |
children |
comparison
equal
deleted
inserted
replaced
993:44e7e497c3b7 | 994:2f89959fb9f0 |
---|---|
23 s = length(obj.c); | 23 s = length(obj.c); |
24 end | 24 end |
25 | 25 |
26 function b = isExplicit(obj) | 26 function b = isExplicit(obj) |
27 b = all(all(triu(obj.a)==0)); | 27 b = all(all(triu(obj.a)==0)); |
28 end | |
29 | |
30 function g = testEquationGain(obj, z) | |
31 default_arg('z', sym('z')); | |
32 s = obj.nStages(); | |
33 | |
34 b = sym(obj.b); | |
35 A = sym(obj.a); | |
36 one = sym(ones(s,1)); | |
37 I = sym(eye(s)); | |
38 | |
39 g = abs(1 + z*b*inv(I-z*A)*one); | |
28 end | 40 end |
29 | 41 |
30 % TBD: Add functions for checking accuracy, stability? | 42 % TBD: Add functions for checking accuracy, stability? |
31 end | 43 end |
32 | 44 |