How to hold a plot when using plot3 in matlab?

前端 未结 1 1736
说谎
说谎 2020-12-18 07:16

This works as I expected:

    for i=1:100
      hold on;
      plot(i,i^2);
      drawnow;
    end

Ploting the points as they come in the s

相关标签:
1条回答
  • 2020-12-18 07:44

    Your code correctly plots a 3-D curve. All you need to do to see it is add

    view(3);
    

    anywhere in your code.

    Additionally, one hold on command is sufficient (i.e. you don't need to repeat it in every loop iteration).

    0 讨论(0)
提交回复
热议问题