From 822bd0b04d1cce54c2fff57c4b206c51d1dcb940 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 22 Apr 2014 22:01:56 -0400 Subject: rename notes -> lectures --- notes/lec07_intro2_eulers | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 notes/lec07_intro2_eulers (limited to 'notes/lec07_intro2_eulers') diff --git a/notes/lec07_intro2_eulers b/notes/lec07_intro2_eulers deleted file mode 100644 index 17630d2..0000000 --- a/notes/lec07_intro2_eulers +++ /dev/null @@ -1,46 +0,0 @@ - -euler's method: - -dx/dt =~ ( x(t + Dt) - x(t) ) / Dt, for very small Dt - -so, x(t + Dt) = x(t) + f(x) * Dt, which is how to integrate the system - -"if Dt is too large, becomes highly unstable" (duh) - -scary MATLAB advice: -- watch out of totally crazy values (very high) -- non-negative values go negative - -MATLAB built-in ODE solvers: ode23, ode15s - -runge-kutta (use dxdt from between t_n and t_(n+1) ) -variable time-step methods - -summary: Euler's method sucks, news at 11. - -### misc julia notes - -the only place to find history (?!?!!) is in ~/.julia_history - -### codes - -using Winston - -a=20 -b=2 -c=5 -dt = 0.05 -tlast = 2 - -iterations = int( round(tlast/dt) ) -xall = zeros(iterations, 1) -x = c - -for i = 1:iterations - xall[i] = x - dxdt = a - b*x - x = x + dxdt*dt -end - -time = dt * [0:iterations-1]' -plot(time,xall) -- cgit v1.2.3