Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: David Bateman <adb014@us...>  20040927 09:57:04

Update of /cvsroot/octave/octaveforge/extra/ode In directory sc8prcvs1.sourceforge.net:/tmp/cvsserv10542 Modified Files: ode23.m ode45.m ode78.m penddot.m pendulum.m rk2fixed.m rk4fixed.m rk8fixed.m Log Message: Fix copyright notices so that help is correctly displayed Index: ode78.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/ode78.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  ode78.m 5 Aug 2002 02:43:13 0000 1.2 +++ ode78.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,19 +1,18 @@ function [tout,xout] = ode78(FUN,tspan,x0,ode_fcn_format,tol,trace,count,hmax)  % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % ode78.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % ode78.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  % + % ode78 (v1.14) Integrates a system of ordinary differential equations using % 7th order formulas. % @@ 94,6 +93,8 @@ % modified: 19 May 2001 +function [tout,xout] = ode78(FUN,tspan,x0,ode_fcn_format,tol,trace,count,hmax) + % The Fehlberg coefficients: alpha_ = [ 2./27., 1/9, 1/6, 5/12, 0.5, 5/6, 1/6, 2/3, 1/3, 1, 0, 1 ]'; beta_ = [ 2/27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; Index: rk4fixed.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/rk4fixed.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  rk4fixed.m 5 Aug 2002 02:43:13 0000 1.2 +++ rk4fixed.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,19 +1,18 @@ function [tout,xout] = rk4fixed(FUN,tspan,x0,Nsteps,ode_fcn_format,trace,count)  % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % rk4fixed.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % rk4fixed.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  % + % rk4fixed (v1.14) is a 4th order RungeKutta numerical integration routine. % It requires 4 function evaluations per step. % @@ 54,6 +53,8 @@ % created : 06 October 1999 % modified: 19 May 2001 +function [tout,xout] = rk4fixed(FUN,tspan,x0,Nsteps,ode_fcn_format,trace,count) + if nargin < 7, count = 0; end if nargin < 6, trace = 0; end if nargin < 5, Nsteps = 100/(tspan(2)tspan(1)); end % < 100 is a guess for a default, Index: ode23.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/ode23.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  ode23.m 5 Aug 2002 02:43:13 0000 1.2 +++ ode23.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,18 +1,18 @@ function [tout,xout] = ode23(FUN,tspan,x0,ode_fcn_format,tol,trace,count,hmax)  % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % ode23.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % ode23.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  + % % ode23 (v1.14) Integrates a system of ordinary differential equations using % 2nd & 3rd order RungeKutta formulas. This particular 3rdorder method reduces @@ 84,6 +84,8 @@ % created : 06 October 1999 % modified: 27 June 2001 +function [tout,xout] = ode23(FUN,tspan,x0,ode_fcn_format,tol,trace,count,hmax) + if nargin < 8, hmax = (tspan(2)  tspan(1))/2.5; end if nargin < 7, count = 0; end if nargin < 6, trace = 0; end Index: rk2fixed.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/rk2fixed.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  rk2fixed.m 5 Aug 2002 02:43:13 0000 1.2 +++ rk2fixed.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,19 +1,18 @@ function [tout,xout] = rk2fixed(FUN,tspan,x0,Nsteps,ode_fcn_format,trace,count)  % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % rk2fixed.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % rk2fixed.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  % + % rk2fixed (v1.14) integrates a system of ordinary differential equations using a % 2nd order RungeKutta formula called Ralston's method. % This choice of 2nd order coefficients provides a minimum bound on truncation error. @@ 58,6 +57,8 @@ % created : 06 October 1999 % modified: 19 May 2001 +function [tout,xout] = rk2fixed(FUN,tspan,x0,Nsteps,ode_fcn_format,trace,count) + if nargin < 7, count = 0; end if nargin < 6, trace = 0; end if nargin < 5, Nsteps = 400/(tspan(2)tspan(1)); end % < 400 is a guess for a default, Index: ode45.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/ode45.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  ode45.m 5 Aug 2002 02:43:13 0000 1.2 +++ ode45.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,19 +1,18 @@ function [tout,xout,Nsteps_acc,Nsteps_rej] = ode45(FUN,tspan,x0,pair,ode_fcn_format,tol,trace,count,hmax,N_est_acc_steps)  % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % ode45.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % ode45.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  % + % ode45 (v1.15) integrates a system of ordinary differential equations using % 4th & 5th order embedded formulas from Dormand & Prince or Fehlberg. % @@ 101,6 +100,8 @@ % created : 06 October 1999 % modified: 03 July 2001 +function [tout,xout,Nsteps_acc,Nsteps_rej] = ode45(FUN,tspan,x0,pair,ode_fcn_format,tol,trace,count,hmax,N_est_acc_steps) + if nargin < 10, N_est_acc_steps = (tspan(2)tspan(1))*1e3; end if nargin < 9, hmax = (tspan(2)  tspan(1))/2.5; end if nargin < 8, count = 0; end Index: rk8fixed.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/rk8fixed.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  rk8fixed.m 5 Aug 2002 02:43:13 0000 1.2 +++ rk8fixed.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,19 +1,18 @@ function [tout,xout] = rk8fixed(FUN,tspan,x0,Nsteps,ode_fcn_format,trace,count)  % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % rk8fixed.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % rk8fixed.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  % + % rk8fixed (v1.14) is an 8th order RungeKutta numerical integration routine. % It requires 13 function evaluations per step. This is not the most % efficient 8th order implementation. It was just the easiest to put @@ 56,6 +55,8 @@ % created : 06 October 1999 % modified: 19 May 2001 +function [tout,xout] = rk8fixed(FUN,tspan,x0,Nsteps,ode_fcn_format,trace,count) + if nargin < 7, count = 0; end if nargin < 6, trace = 0; end if nargin < 5, Nsteps = 50/(tspan(2)tspan(1)); end % < 50 is a guess for a default, Index: pendulum.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/pendulum.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  pendulum.m 5 Aug 2002 02:43:13 0000 1.2 +++ pendulum.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,17 +1,18 @@ % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % pendulum.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % pendulum.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  % + % This integrates a set of ordinary differential equations (ODE) using 6 different % ODE solvers. The equations represent the dynamics of a simple pendulum. % Index: penddot.m =================================================================== RCS file: /cvsroot/octave/octaveforge/extra/ode/penddot.m,v retrieving revision 1.2 retrieving revision 1.3 diff u d r1.2 r1.3  penddot.m 5 Aug 2002 02:43:13 0000 1.2 +++ penddot.m 27 Sep 2004 09:56:47 0000 1.3 @@ 1,19 +1,18 @@ function xdot=penddot(t,x)  % Copyright (C) 2001, 2000 Marc Compere % This file is intended for use with Octave. % penddot.m is free software; you can redistribute it and/or modify it +% +% This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % penddot.m is distributed in the hope that it will be useful, but +% This program is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details at http://www.gnu.org/copyleft/gpl.html. % +% This file is intended for use with Octave. %  % + % This is an example derivative function file that works % with Octave or Matlab. % The equations represent motion of a simple pendulum with damping. @@ 47,6 +46,8 @@ % created : 06 October 1999 % modified: 23 October 2001 +function xdot=penddot(t,x) + global m g l b counter index xdot=[ x(2) , 1/(1/3*m*l^2)*(b*x(2)m*g*l/2*sin(x(1)))]'; 