MATLAB Mathematics - SERC - Index of
MATLAB Mathematics - SERC - Index of MATLAB Mathematics - SERC - Index of
5 Differential Equations solution y 200 180 160 140 120 100 80 60 40 20 y 1 y 2 y 3 An example of Wille’ and Baker 0 0 1 2 3 4 5 time t Evaluating the Solution at Specific Points The method implemented in dde23 produces a continuous solution over the whole interval of integration [ t 0 , t f ]. You can evaluate the approximate solution, St (), at any point in [ t 0 , t f ] using the helper function deval and the structure sol returned by dde23. Sint = deval(sol,tint) The deval function is vectorized. For a vector tint, the ith column of Sint approximates the solution y( tint(i) ) . Using the output sol from the previous example, this code evaluates the numerical solution at 100 equally spaced points in the interval [0,5] and plots the result. tint = linspace(0,5); Sint = deval(sol,tint); plot(tint,Sint); 5-56
Initial Value Problems for DDEs Discontinuities dde23 can solve problems with discontinuities in the history or discontinuities in coefficients of the equations. It provides properties that enable you to supply locations of known discontinuities and a different initial value. Discontinuity Property Comments At the initial value InitialY Generally the initial value yt ( 0 ) is the t = t 0 value St ( 0 ) returned by the history function, which is to say that the solution is continuous at the initial point. However, if this is not the case, supply a different initial value using the InitialY property. In the history, i.e., the solution at t < t 0 , or in the equation coefficients for t > t 0 Jumps Provide the known locations t of the discontinuities in a vector as the value of the Jumps property. State-dependent Events dde23 uses the events function you supply to locate these discontinuities. When dde23 finds such a discontinuity, restart the integration to continue. Specify the solution structure for the current integration as the history for the new integration. dde23 extends each element of the solution structure after each restart so that the final structure provides the solution for the whole interval of integration. If the new problem involves a change in the solution, use the InitialY property to specify the initial value for the new integration. 5-57
- Page 140 and 141: 5 Differential Equations This secti
- Page 142 and 143: 5 Differential Equations The basic
- Page 144 and 145: 5 Differential Equations 2 Code the
- Page 146 and 147: 5 Differential Equations function.
- Page 148 and 149: 5 Differential Equations One way to
- Page 150 and 151: 5 Differential Equations y0, yp0 Ve
- Page 152 and 153: 5 Differential Equations For exampl
- Page 154 and 155: 5 Differential Equations 1 0.8 0.6
- Page 156 and 157: 5 Differential Equations 2.5 Soluti
- Page 158 and 159: 5 Differential Equations To run thi
- Page 160 and 161: 5 Differential Equations 2 u′ i =
- Page 162 and 163: 5 Differential Equations dydt(i+1,:
- Page 164 and 165: 5 Differential Equations refine = 4
- Page 166 and 167: 5 Differential Equations Example: A
- Page 168 and 169: 5 Differential Equations function [
- Page 170 and 171: 5 Differential Equations Note The R
- Page 172 and 173: 5 Differential Equations 1 Robertso
- Page 174 and 175: 5 Differential Equations The MATLAB
- Page 176 and 177: 5 Differential Equations Summary of
- Page 178 and 179: 5 Differential Equations Problem Si
- Page 180 and 181: 5 Differential Equations Error Tole
- Page 182 and 183: 5 Differential Equations Troublesho
- Page 184 and 185: 5 Differential Equations Function d
- Page 186 and 187: 5 Differential Equations dde23 prod
- Page 188 and 189: 5 Differential Equations The exampl
- Page 192 and 193: 5 Differential Equations Example: C
- Page 194 and 195: 5 Differential Equations Changing D
- Page 196 and 197: 5 Differential Equations BVP Functi
- Page 198 and 199: 5 Differential Equations two-point
- Page 200 and 201: 5 Differential Equations The input
- Page 202 and 203: 5 Differential Equations 2 Pass the
- Page 204 and 205: 5 Differential Equations 3 Code the
- Page 206 and 207: 5 Differential Equations Finding Un
- Page 208 and 209: 5 Differential Equations vectorized
- Page 210 and 211: 5 Differential Equations There is a
- Page 212 and 213: 5 Differential Equations 3 Solve on
- Page 214 and 215: 5 Differential Equations hold off T
- Page 216 and 217: 5 Differential Equations Note The d
- Page 218 and 219: 5 Differential Equations legend('An
- Page 220 and 221: 5 Differential Equations Here, v(1-
- Page 222 and 223: 5 Differential Equations solution v
- Page 224 and 225: 5 Differential Equations Note The D
- Page 226 and 227: 5 Differential Equations After disc
- Page 228 and 229: 5 Differential Equations The output
- Page 230 and 231: 5 Differential Equations 2 Code the
- Page 232 and 233: 5 Differential Equations Note See t
- Page 234 and 235: 5 Differential Equations The exampl
- Page 236 and 237: 5 Differential Equations and the ri
- Page 238 and 239: 5 Differential Equations u1(x,t) 1
5 Differential Equations<br />
solution y<br />
200<br />
180<br />
160<br />
140<br />
120<br />
100<br />
80<br />
60<br />
40<br />
20<br />
y 1<br />
y 2<br />
y 3<br />
An example <strong>of</strong> Wille’ and Baker<br />
0<br />
0 1 2 3 4 5<br />
time t<br />
Evaluating the Solution at Specific Points<br />
The method implemented in dde23 produces a continuous solution over the<br />
whole interval <strong>of</strong> integration [ t 0 , t f ]. You can evaluate the approximate<br />
solution, St (), at any point in [ t 0 , t f ] using the helper function deval and the<br />
structure sol returned by dde23.<br />
Sint = deval(sol,tint)<br />
The deval function is vectorized. For a vector tint, the ith column <strong>of</strong> Sint<br />
approximates the solution y( tint(i) ) .<br />
Using the output sol from the previous example, this code evaluates the<br />
numerical solution at 100 equally spaced points in the interval [0,5] and plots<br />
the result.<br />
tint = linspace(0,5);<br />
Sint = deval(sol,tint);<br />
plot(tint,Sint);<br />
5-56