To integrate a differential equation f
from 0 to t
using Symbolic Math Toolbox in Matlab, follow the steps below:
f
symbolically using syms
command:main.m15 chars3 lines
f
symbolically using the int()
function:main.m14 chars2 lines
matlabFunction()
:main.m27 chars2 lines
F_func
at t
:main.m31 chars2 lines
The final result will be the value of the integral of f
from 0 to t
.
gistlibby LogSnag