Home > K25104 > ODEs > boundary_locus_script_5.m

boundary_locus_script_5

PURPOSE ^

Usage example for boundary_locus

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Usage example for boundary_locus
 related to the Backward Differentiation Formulae

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Usage example for boundary_locus
0002 % related to the Backward Differentiation Formulae
0003 
0004 n=100;
0005 subplot(3,2,1);
0006 rho = [1; -1];
0007 sigma = [1; 0];
0008 [ z ] = boundary_locus( rho,sigma,n );
0009 plot(z);
0010 title('1-step BDF method');
0011 axis([-1/2 5/2 -3/2 3/2]);
0012 grid on;
0013 
0014 subplot(3,2,2);
0015 rho = [1; -4/3; 1/3];
0016 sigma = [2/3; 0; 0];
0017 [ z ] = boundary_locus( rho,sigma,n );
0018 plot(z);
0019 title('2-step BDF method');
0020 axis([-1/2 9/2 -5/2 5/2]);
0021 grid on;
0022 
0023 subplot(3,2,3);
0024 rho = [1; -18/11; 9/11; -2/11];
0025 sigma = [6/11; 0; 0; 0];
0026 [ z ] = boundary_locus( rho,sigma,n );
0027 plot(z);
0028 title('3-step BDF method');
0029 axis([-1/2 7 -9/2 9/2]);
0030 grid on;
0031 
0032 subplot(3,2,4);
0033 rho = [1; -48/25; 36/25; -16/25; 3/25];
0034 sigma = [12/25; 0; 0; 0; 0];
0035 [ z ] = boundary_locus( rho,sigma,n );
0036 plot(z);
0037 title('4-step BDF method');
0038 axis([-1 11 -8 8]);
0039 grid on;
0040 
0041 subplot(3,2,5);
0042 rho = [1; -300/137; 300/137; -200/137; 75/137; -12/137];
0043 sigma = [60/137; 0; 0; 0; 0; 0];
0044 [ z ] = boundary_locus( rho,sigma,n );
0045 plot(z);
0046 title('5-step BDF method');
0047 axis([-4 19 -15 15]);
0048 grid on;
0049 
0050 subplot(3,2,6);
0051 rho = [1; -360/147; 450/147; -400/147; 225/147; -72/147; 10/147];
0052 sigma = [60/147; 0; 0; 0; 0; 0; 0];
0053 [ z ] = boundary_locus( rho,sigma,n );
0054 plot(z);
0055 title('6-step BDF method');
0056 axis([-10 30 -25 25]);
0057 grid on;

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