You can use hold
to lock the axes:
...
view(-4,8);
hold on
comet3(u(:,1),u(:,2),u(:,3));
hold off
If you want to be more specific, you can just hold the current axis (gca
) or a handle to particular axis that you plotting to:
...
view(-4,8);
hold(gca,'on');
comet3(gca,u(:,1),u(:,2),u(:,3));
hold(gca,'off');