Hold on not working with ezplot3
조회 수: 6 (최근 30일)
이전 댓글 표시
I'm not sure why the hold on is not working in this example.
syms t1 t2 t3
line1 = [0,0,0] + t1*[0,0,1];
line2 = [1,0,0] + t2*[0,0,1];
line3 = [0,1,0] + t3*[0,0,1];
hold on
ezplot3(line1(1),line1(2),line1(3))
ezplot3(line2(1),line2(2),line2(3))
ezplot3(line3(1),line3(2),line3(3))
hold off
Any clues?
댓글 수: 0
채택된 답변
Wayne King
2011년 10월 21일
Hi Sara, ezplot3() is written in such a way that it undoes the effect of any previously issued hold on command.
In this case you can use plot3()
t = linspace(0,1,300);
plot3(zeros(300,1),zeros(300,1),t);
axis([-2 2 0 2 0 2]);
grid on;
hold on;
plot3(ones(300,1),zeros(300,1),t,'r');
plot3(zeros(300,1),ones(300,1),t,'k');
legend('line1','line2','line3');
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!