matlab如何画三维图z=sqrt(0.5(1+x))/xy,x的范围是(0,1],y取任意正整数.如何画z关于x,y的三维图,谢谢!clearformat longx=0.01:0.99/20:1; y=1:10:200; for j=1:length(x) for k=1:length(y) q(j,k)=sqrt(0.5*(1+x(j))); g(j,k
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/25 08:48:12
matlab如何画三维图z=sqrt(0.5(1+x))/xy,x的范围是(0,1],y取任意正整数.如何画z关于x,y的三维图,谢谢!clearformat longx=0.01:0.99/20:1; y=1:10:200; for j=1:length(x) for k=1:length(y) q(j,k)=sqrt(0.5*(1+x(j))); g(j,k
matlab如何画三维图
z=sqrt(0.5(1+x))/xy,
x的范围是(0,1],y取任意正整数.
如何画z关于x,y的三维图,谢谢!
clear
format long
x=0.01:0.99/20:1;
y=1:10:200;
for j=1:length(x)
for k=1:length(y)
q(j,k)=sqrt(0.5*(1+x(j)));
g(j,k)=x(j)*y(k);
z(j,k)=q(j,k)./g(j,k);
end
end
mesh(z);
这个程序画出来的图明显不对,不知道哪里出了问题,请各位大侠指教!
matlab如何画三维图z=sqrt(0.5(1+x))/xy,x的范围是(0,1],y取任意正整数.如何画z关于x,y的三维图,谢谢!clearformat longx=0.01:0.99/20:1; y=1:10:200; for j=1:length(x) for k=1:length(y) q(j,k)=sqrt(0.5*(1+x(j))); g(j,k
x = 0.1:0.001:1;
y = 1:.5:100;
[X,Y] = meshgrid(x,y);
Z = sqrt(0.5*(1+X))./(X.*Y);
mesh(X,Y,Z);