MATLAB Code:
close all
clear
clc
[x,y] = meshgrid(linspace(-10,10,100)); % creating a 2d mesh for
(x,y) locations
a = 0.1;
z = sin(sqrt(x.^2 + y.^2)) ./ (a + sqrt(x.^2 + y.^2));
surf(x,y,z)
xlabel('x'), ylabel('y'), zlabel('z')
title('Surface Plot')
Plot:
Then we can use the cylinder function to revolve those profiles around the z-axis and plot them. ...