matlab如何编写Z=1⼀(1+sqrt(1+X^2+(Y-7.5).^2)+1⼀(1+sqrt(1+X^2+(Y+7.5).^2)函数

2025-01-07 16:46:44
推荐回答(1个)
回答1:

[x,y]=meshgrid(-7.5:7.5,-15:15);
z=1./(1+sqrt(1+x.^2+(y-7.5).^2))+1./(1+sqrt(1+x.^2+(y+7.5).^2));
mesh(x,y,z);