how can i plot this 2 variable maths equation on a 3d plot
Show older comments
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))))
Answers (1)
Star Strider
on 26 Mar 2021
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)))
.
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!