方法一:
plot(plot::Implicit3d(-(1-p-q)*(2/(35*roll^2))+p/(exp(0.35)-1)*exp(-roll+0.4)+(q*8.0064)/(exp(-8.0064*0.35))*(exp(8.0064*(roll-0.4))), p = 0..1, q = 0..1, roll = 0.05..0.4), Scaling = Constrained);
方法二:
f = @(p,q,roll) -(1-p-q).(2./(35.*roll.^2))+p./(exp(0.35)-1).*exp(-roll+0.4)+(q.*8.0064)./(exp(-8.0064.*0.35)).(exp(8.0064.*(roll-0.4))); % 函数表达式
[p,q,roll] = meshgrid(0:.01:1,0:.01:1,0.05:.01:0.4); % 画图范围
v = f(p,q,roll)+max(p+q-1,0);
h = patch(isosurface(p,q,roll,v,0));
isonormals(p,q,roll,v,h)
set(h,’FaceColor’,’r’,’EdgeColor’,’none’);
xlabel(‘p’);ylabel(‘q’);zlabel(‘roll’);
alpha(1)
grid on; view([1,1,1]); axis equal; camlight; lighting gouraud