解一阶微分方程[c,d]=dsolve('Dx=2','Dy=x','x(0)=0','y(0)=1') c = 2t d = t^2+1二阶微分方程dsolve(‘D2y=-a^2y’,‘y(0)=1’,‘Dy(pi/a)=0’,’x’) ans = cos(a*x)