Home > K25104 > ODEs > RK_stab_fun_script_1.m

RK_stab_fun_script_1

PURPOSE ^

Usage example for RK_stab_fun

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Usage example for RK_stab_fun
 Boundary of stability domain of Heun's method

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Usage example for RK_stab_fun
0002 % Boundary of stability domain of Heun's method
0003 
0004 alpha = 1;
0005 b = [1 - 1/(2*alpha); 1/(2*alpha)];
0006 c = [0; alpha];
0007 A = [0 0;
0008     alpha 0];
0009 [ R ] = RK_stab_fun( b,c,A )
0010 [X,Y] = meshgrid(-2.5:0.1:0.5,-2:0.1:2);
0011 Z = X+1i*Y;
0012 Rmod = abs(R);
0013 Rmod = matlabFunction(Rmod);
0014 boundary = feval(Rmod,Z);
0015 contour(X,Y,boundary,[1 1]);
0016 grid on;
0017 title(['Heun',char(39),'s rule']);

Generated on Mon 18-Jan-2016 10:25:49 by m2html © 2005