how can i delete a quiver3 object

조회 수: 5 (최근 30일)
Andrea Gusmara
Andrea Gusmara 2020년 6월 3일
댓글: Andrea Gusmara 2020년 6월 4일
hi
to everyone I would like to ask you how do I remove these three quiver3 objects from my patch
surf=gca;
xlim(surf,[-30 +30]);
xlabel('x');
zlim(surf,[-30 +30]);
zlabel('z');
ylim(surf,[-30 +30]);
ylabel('y');
%regola in una modalità fissa la lunghezza dela singola unita degli assi
daspect([1 1 1]);
S.Vertices=[];
S.Faces=[];
p=patch(S);
frame0=eye(4);
hold('on');
frame0V=ReferenceSystem(frame0);
function [q1,q2,q3]=ReferenceSystem(frame)
q1 =quiver3(frame(1,4),frame(2,4),frame(3,4),frame(1,1),frame(2,1),frame(3,1), 'Color', 'r');
q1.LineWidth=3;
q1.AutoScaleFactor=8;
q2 = quiver3(frame(1,4),frame(2,4),frame(3,4),frame(1,2),frame(2,2), frame(3,2), 'Color', 'g');
q2.LineWidth=3;
q2.AutoScaleFactor=8;
q3 = quiver3(frame(1,4),frame(2,4),frame(3,4),frame(1,3),frame(2,3), frame(3,3), 'Color', 'b');
q3.LineWidth=3;
q3.AutoScaleFactor=10;
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 6월 3일
delete([q1, q2, q3])
?
Andrea Gusmara
Andrea Gusmara 2020년 6월 4일
unluckily Doesn't work.
Unrecognized function or variable 'q1'.

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 4일
Call the function with 3 output arguments to get the handle of the quiver objects.
[frame0Vq1,frame0Vq2,frame0Vq3]=ReferenceSystem(frame0);
and then delete it like this
delete([frame0Vq1,frame0Vq2,frame0Vq3])
  댓글 수: 1
Andrea Gusmara
Andrea Gusmara 2020년 6월 4일
thank you so much , now works correctly.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by