因为这种写法要过时了呗,但是目前还能用
Character vector inputs will be removed in a future release. Instead, use syms to declare variables and replace inputs such as dsolve('Dy = y') with syms y(t); dsolve(diff(y,t) == y).
新的写法如下:
syms x(t) a
eqn = 0.5*diff(x,t,2) == -0.2*diff(x,t)-10*x;
Dx = diff(x,t);
cond = [Dx(0)==0 x(0)==0.5];
dsolve(eqn,cond)