It should work. Please try it again:
axes('nextplot, 'add');
disk1 = patch('xdata', xcirc1(:,1), 'ydata', ycirc1(:,1), 'zdata', zcirc1(:,1));
disk2 = patch('xdata', xcirc2(:,1), 'ydata', ycirc2(:,1), 'zdata', zcirc2(:,1));
for ii = 1:length(y)
set(disk1, 'xdata', xcirc1(:,ii), 'ydata', ycirc1(:,ii), 'zdata', zcirc1(:,ii));
set(disk2, 'xdata', xcirc2(:,ii), 'ydata', ycirc2(:,ii), 'zdata', zcirc2(:,ii));
drawnow
pause(0.01)
end
If the coordinates are not Inf or NaN and are within the axes limits and the view direction is not parallel to the planes of the circles, the patches must be visible.
Best Answer