comparison +time/+rkparameters/rk4.m @ 690:9c3c180c7ed3 feature/d1_staggered

Implement RK4 for discrete data.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 06 Mar 2018 11:59:43 -0800
parents
children
comparison
equal deleted inserted replaced
682:ec0ac76006e2 690:9c3c180c7ed3
1 function [a,b,c,s] = rk4()
2
3 % Butcher tableau for classical RK$
4 s = 4;
5 a = sparse(s,s);
6 a(2,1) = 1/2;
7 a(3,2) = 1/2;
8 a(4,3) = 1;
9 b = 1/6*[1; 2; 2; 1];
10 c = [0; 1/2; 1/2; 1];
11
12 end