具体见示例代码
syms y1(t) y2(t);% Sol1 Sol2 说明了 diff(y,2) 和 diff(diff(y1,t),t) 没有区别eqn1 = [diff(y1,2)+y1==0,diff(y2,2)+y2==0];Sol1 = dsolve(eqn1);Sol1.y1Sol1.y2eqn2 = [diff(diff(y1,t),t)+y1==0,diff(diff(y2,t),t)+y2==0];Sol2 = dsolve(eqn2);Sol2.y1Sol2.y2% Sol1 Sol2 Sol3 说明了等式行向量可以被求解y = [y1 y2];d2y=[diff(diff(y1,t),t) diff(diff(y2,t),t)];eqn3 = d2y+y==0;Sol3 = dsolve(eqn3)Sol3.y1Sol3.y2% Sol3 Sol4 说明了等式列向量不能被求解eqn4 = eqn3';Sol4 = dsolve(eqn4)
输出结果