I am trying to plot a 2nd order linear ODE with the following code:
t = 0:0.1:10;
y = matlabFunction(dsolve('D2y + 4 * Dy + 4 * y = 0', 'y(0) = 0', 'Dy(0) = 0', 't'));
plot(t, y(t));
But I get the following error:
Error using sym.matlabFunction>@()0.0
Too many input arguments.
Any idea why?
First, a heads up. The initial values specified give f(t) = 0. Change these to anything else to get something decent.