C++ style guide
Jump to navigation
Jump to search
% Esfera theta = linspace(0, 2*pi, 300); phi = linspace(0, pi, 300); [Theta, Phi] = meshgrid(theta, phi);
r = 5; % Radio x = r * sin(Phi) .* cos(Theta); y = r * sin(Phi) .* sin(Theta); z = r * cos(Phi);
figure; subplot(1,2,1) surf(x, y, z); title("Esfera"); xlabel("X"); ylabel("Y"); zlabel("Z"); shading interp; axis equal;
subplot(1,2,2) contourf(x, y, z); title("Curvas de Nivel"); xlabel("X"); ylabel("Y");