how can i plot this 2 variable maths equation on a 3d plot
显示 更早的评论
i want to plot this equation in 3d x axis being theta y axis being lamda and the result being the z axis
(1+(2*(cos(theta)**2 +4 * (lamda)*(sqrt(1-lamda**2))*(cos(theta))*(sin(theta))))
回答(1 个)
Star Strider
2021-3-26
Try this:
thetav = linspace(0, 2*pi, 50);
lambdav = linspace(0, 10, 25);
[Th,Lb] = ndgrid(thetav, lambdav);
Z = @(theta,lamda) 1+(2*(cos(theta).^2 +4 .* (lamda).*(sqrt(1-lamda.^2)).*(cos(theta)).*(sin(theta)))) ;
figure
surf(Th, Lb, real(Z(Th,Lb)))
figure
surf(Th, Lb, imag(Z(Th,Lb)))
figure
surf(Th, Lb, abs(Z(Th,Lb)))
.
类别
在 帮助中心 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!