필터 지우기
필터 지우기

Help with a scatter3 plot

조회 수: 1 (최근 30일)
Tom
Tom 2014년 2월 20일
댓글: Tom 2014년 2월 20일
Hello,
I have:
x =
-1.0393 0.0844 1.3133
0.1248 1.4003 -0.6345
1.4067 -0.5673 0.4601
-0.8079 -1.0974 -0.8621
and I am implementing:
scatter3(x(:,1), x(:,2), x(:,3),35,'r','fill');
Could anyone help me implement the following two steps on the scatter3 plot.
I would like to
a) Clarify where the origin lies by plotting the axis lines.
b) Draw vectors from the origin to the four data points.
Any help would be greatly appreciated.
Kind regards,
Tom

채택된 답변

Wayne King
Wayne King 2014년 2월 20일
편집: Wayne King 2014년 2월 20일
Why not use quiver3() if you want vectors
x =[
-1.0393 0.0844 1.3133
0.1248 1.4003 -0.6345
1.4067 -0.5673 0.4601
-0.8079 -1.0974 -0.8621];
orig = zeros(4,1);
quiver3(orig,orig,orig,x(:,1),x(:,2),x(:,3))
  댓글 수: 1
Tom
Tom 2014년 2월 20일
Indeed, why don't I.
Thanks

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by