![]() |
帮指出下列程序的问题所在
下列两图形的问题出在哪里?
(一)syms x y t=dsolve('x*Dy-(Dy)^2-y','x'); ezplot(t(1),[-6,6,-4,8],1); cc=get(gca,'Children'); set(cc,'color','r','linewidth',4); i=0; for k=-2:0.5:2 i=i+1; subplot(3,3,i); ezplot(subs(t(2),'C1',k),[-6,6,-4,8],2); title('results of equations'); end (二)syms x y t=dsolve('x*Dy-(Dy)^2-y','x'); cc=get(gca,'Children'); set(cc,'color','r','linewidth',4); i=0; for k=-2:0.5:2 i=i+1; subplot(3,3,i); ezplot(subs(t(2),'C1',k),[-6,6,-4,8],1); title('results of equations'); end ezplot(t(1),[-6,6,-4,8],2); |
回复: 帮指出下列程序的问题所在
syms x y
t=dsolve('x*Dy-(Dy)^2-y','x'); ezplot(t(1),[-6,6,-4,8],1); cc=get(gca,'Children'); set(cc,'color','r','linewidth',4); i=0;figure for k=-2:0.5:2 i=i+1; subplot(3,3,i); ezplot(subs(t(2),'C1',k),[-6,6,-4,8],2); title('results of equations'); end 在i=0这句话后面加上figure,就好了。因为第一段程序中你调用了当前图形,进行设置。但是循环的画图里面没有释放当前图形,因此9个子图的第一个图形是画不出来的 |
所有时间均为北京时间。现在的时间是 15:41。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.