Overview
Comment: | Put correct arguments for _input -- (x,t) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
06c855f0845d013766d074f76f4f5dde |
User & Date: | gawthrop@users.sourceforge.net on 1998-06-25 08:47:23 |
Other Links: | branch diff | manifest | tags |
Context
1998-06-25
| ||
17:45:03 | No change -- but checked that explicit causality works! check-in: daf24cad68 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
08:47:23 | Put correct arguments for _input -- (x,t) check-in: 06c855f084 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
1998-06-24
| ||
07:43:42 | Version 2.91 -- includes implicit integration (octave) check-in: 43632122ca user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/ode2odes_m from [6a08492f47] to [0c76dc5319].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.15 1998/05/21 16:20:27 peterg ## Modified to include explicit algebraic loop solution ## ## Revision 1.14 1998/05/19 19:48:02 peterg ## Read the simpar file now. ## ## Revision 1.13 1998/05/14 08:05:10 peterg ## Put back under RCS ## ## Revision 1.12 1998/02/25 18:02:39 peterg |
︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | x = xx(1:nx); xx = $1_ode(xx,ts); ts = ts + dt; dx = xx(1:nx); x = x + dx*dt; xx(1:nx) = x; end; end; elseif strcmp(method,'implicitl') %Euler integration X=[]; dt = (T(2)-T(1))/STEPFACTOR; u = $1_input(x,t); A = $1_sm(x,u); inverse = inv(eye(nx) - dt*A); for t=T' X = [X; xx']; ts = t; for i=1:STEPFACTOR x = xx(1:nx); xx = $1_ode(xx,ts); ts = ts + dt; dx = xx(1:nx); x = inverse*(x + dt*(dx - A*x)); xx(1:nx) = x; end; end; elseif strcmp(method,'implicit') %Euler integration X=[]; dt = (T(2)-T(1))/STEPFACTOR; One = eye(nx); for t=T' X = [X; xx']; ts = t; for i=1:STEPFACTOR x = xx(1:nx); u = $1_input(x,t); A = $1_sm(x,u); xx = $1_ode(xx,ts); ts = ts + dt; dx = xx(1:nx); x = (One-A*dt)\(x + dt*(dx - A*x)); xx(1:nx) = x; end; end; else error('Method %s not available here', METHOD); return; end; write_matrix([T,X], '$1_odes'); else |
︙ |