Hey I'm teaching a calculus course, and for an example in my lecture on surface integrals I would like to generate a surface plot in MATLAB of a portion of a circular cylinder. Here is my MATLAB code for the case where the parameter domain is rectangular:
clc; clear
syms theta z
x(theta,z) = cos(theta)
y(theta,z) = sin(theta)
z(theta,z) = z
fsurf(x, y, z, [0 2*pi 0 1])
However, the surfaced required for the problem instead has 0<z<1+sin(theta)
I'm not sure what is the best way to modify this code for the case where the domain is not rectangular. Thanks!
