matlab画二元函数

2024-12-16 03:20:53
推荐回答(1个)
回答1:

mesh函数,matlab中 help mesh

clc;
x=1:1:51000;
y=1:1:51000;
z=zeros(length(x),length(y));
for x=1:1:51000
for y=1:1:51000
z(:,:)=(39672/((24*pi)^(3/2)*0.04*x/((1+0.0001*x)^(1/2))*(0.016*x/(1+0.0003*x))^(1/2)))*(1/exp((x^2+y^2)/(((4*(0.00032*x^2/(1+0.0001*x)))+(0.016*x/(1+0.0003*x))^2)^(1/2)*6)));
end
end
figure
mesh(z);

不过你的这个运算量太大了,matlab跑不出来,X,Y值设小点就好了