349
edits
Line 90: | Line 90: | ||
==== Solution ==== | ==== Solution ==== | ||
<code> | |||
t = linspace (0, 10, 100); | |||
xprime = @(x, t, k) - k * x; | |||
k = 1; | |||
x1 = lsode (@(x, t) xprime (x, t, k), 1, t); | |||
k = 2; | |||
x2 = lsode (@(x, t) xprime (x, t, k), 1, linspace (0, 10, 100)); | |||
plot | |||
</code> | |||
==== Discussion ==== | ==== Discussion ==== | ||
== Plotting == | == Plotting == | ||
== User input == | == User input == |
edits