Matlab question Use the cylindrical coordinate sytstem to fi
Matlab question: Use the cylindrical coordinate sytstem to find the formulas, for the circumference and area of a circle of radius a.
Question continues here:
Many thanks!
Solution
[theta,rho] = cart2pol(x,y)
[theta,rho,z] = cart2pol(x,y,z)
[theta,rho] = cart2pol(x,y) transforms corresponding elements of the two-dimensional Cartesian coordinate arrays x and y into polar coordinates theta and rho.
[theta,rho,z] = cart2pol(x,y,z) transforms three-dimensional Cartesian coordinate arrays x, y, and z into cylindrical coordinates theta, rho, and z.
[x,y] = pol2cart(theta,rho)
[x,y,z] = pol2cart(theta,rho,z)
[x,y] = pol2cart(theta,rho) transforms corresponding elements of the polar coordinate arrays theta and rho to two-dimensional Cartesian, or xy, coordinates.
[x,y,z] = pol2cart(theta,rho,z) transforms corresponding elements of the cylindrical coordinate arrays theta, rho, and z to three-dimensional Cartesian, or xyz, coordinates.
[R PHI] = meshgrid(r,phi);
Z = F(R,PHI); % which assumes your function is vectorized
surf(R.*cos(PHI), R.*sin(PHI), Z);
