Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2010-12-13
帖子: 1
声望力: 0 ![]() |
![]()
新手上路,鼓捣了几天也没调出来
其实就是要对一个函数做三维的图,Z是X,Y的函数 Z=r*0.1+6*0.1^7*(0.5*X^2-0.5*r*r*(Y+1)^2-0.8*r*Y*(X-r*Y-r))+symsum(6*0.1^7*(0.5*Y*(2*n*Y+2*n-Y-2)-0.8*(n-1)*Y^2),n,1,r); 这个r是对x/(y+1)取整,我用的 floor(x/(y+1)) 程序如下: syms n r x y x=500:500:2500; y=0:50:200; r= floor(x/(y+1)); [X,Y]=meshgrid(x,y); Z=r*0.1+6*0.1^7*(0.5*X^2-0.5*r*r*(Y+1)^2-0.8*r*Y*(X-r*Y-r))+symsum(6*0.1^7*(0.5*Y*(2*n*Y+2*n-Y-2)-0.8*(n-1)*Y^2),n,1,r); surf(X,Y,Z); 提示错误如下:??? Error using ==> graph3d.surfaceplot.surfaceplot>localConstructor Invalid input arguments Error in ==> surf at 85 hh = double(graph3d.surfaceplot(args{:},'parent',cax)); 不知道该怎么改,好茫然。从周五一直到这个周末完结也没弄明白,哭了 求高手指点,万分感谢! |
![]() |
![]() |