This repository was archived by the owner on May 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
ode
Florian Rappl edited this page Dec 21, 2014
·
2 revisions
Solves one dimensional ordinary differential equations in the form x'(t) = f(t, x(t)).
Searches for a solution of the differential equation x'(t) = f(t, x) for a given a lambda expression f with two arguments t and x within the range specified as a vector and the starting value of x(t) at t(0) (the first value for t).
Argument deq
Function
Argument points
Matrix
Argument x0
Scalar
Returns 1. entry
Matrix
ode((t, x) => -x, 0:0.01:2, 1)
Solves the DEQ x'(t) + x(t) = 0 and gets the solution vector, which is exp(-t) within the specified point range.
ode((t, x) => x - t, 0:0.01:5, 1.5)
Solves the DEQ x'(t) = x(t) - t and gets the solution vector, which is 1 / 2 * exp(t) + t + 1 within the specified point range.