Hi, I'm trying to make a cylinder made out of cylinders (meaning that it is segmented) so that i can show the transfer of heat in time, which means that every cylinder must have a certain color. The cylinder is supposed to look like this one:
The code i've made is the following:
figure('Name','JT Kick Simulation','NumberTitle','off');hold onc=gobjects(1,100);for i=1:100 [c1X,c1Y,c1Z] = cylinder; c(i)=surf(radiusbottom*(c1X),radiusbottom*(c1Y),heightbottom*(c1Z)+i,'FaceColor',[0 0 1],'EdgeColor','k'); rotate(c(i), [0 1 0], 90)end
But when I run it, the cylinders are all out of place. I've tried changing the value that is increased in the loop but it doesn't work, does anybody knows what can I do?
Thanks.
Best Answer