

% Sample values
h = 10;ri = 1;ra = 1.5;
% Create constant vectors
tht = linspace(0,2*pi,100);
z = linspace(0,h,20);

% Create inner cylinder
xi = repmat(ri*cos(tht),20,1);
yi = repmat(ri*sin(tht),20,1);
zi = repmat(z',1,100);

% Create outer cylinder
xa = repmat(ra*cos(tht),20,1);
ya = repmat(ra*sin(tht),20,1);
za = zi;

% Plot
% surf(xi,yi,zi)
% hold on
% surf(xa,ya,za)

%Now, if you want to close the ends:

x = [xi; flipud(xa); xi(1,:)];
y = [yi; flipud(ya); yi(1,:)];
z = [zi; flipud(za); zi(1,:)];
testsubject = mesh(x,y,z);
set(testsubject,'facecolor',[1 .4 .4],'FaceAlpha',1)
