你好,acos函数的范围是0到pi,但是你要的范围是多少呢?即使改变了,sin和cos的gamma值也不会改变啊。并且你并不需要求gamma,D照样也能出来呢!
cosGamma2 = sin(theta).^2.*cos(phi).^2;%这就是cos(gamma)的平方 sinGamma2 = 1-cosGamma2;%这就是sin(gamma)的平方 D = 0.7*sinGamma2.*(1+cosGamma2); surf(X,Y,Z,D)
有帮助望采纳,先行感谢