C++ style guide

From Octave
Revision as of 20:03, 1 December 2024 by Diana Trujillo (talk | contribs) (Replaced content with "% 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");")
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");