下述代码中,x是A, y是B:
% A,B是变量,取值范围是[0,120].
% T=1000,C=200,d=20,u=5
T=1000;
C=200;
d=20;
u=5;
xx=0:120;
[x y]=meshgrid(xx);
z = (T-C+d*(2*y-1)).*(1+x-y)./(4*u-(1+x-y).^2);
surf(x,y,z)
下述代码中,x是A, y是B:
% A,B是变量,取值范围是[0,120].
% T=1000,C=200,d=20,u=5
T=1000;
C=200;
d=20;
u=5;
xx=0:120;
[x y]=meshgrid(xx);
z = (T-C+d*(2*y-1)).*(1+x-y)./(4*u-(1+x-y).^2);
surf(x,y,z)