필터 지우기
필터 지우기

plot 3, describe centroid

조회 수: 2 (최근 30일)
Tomas
Tomas 2014년 1월 26일
댓글: Image Analyst 2014년 1월 26일
I have matrix T, for example matrix 5 x 3.
T=
centroid1[ 1 2 3 ;
centroid2 4 5 6 ;
centroid3 1 2 3 ;
centroid4 4 5 6 ;
centroid5 1 2 3 ]
I want to draw by means of plot3
matrix T, columns is the coordinates of centroid, one retire row is point(coordinates are colums)
Thanks.
  댓글 수: 3
Tomas
Tomas 2014년 1월 26일
T is matrix, 5x3, columns are x,y,z
Image Analyst
Image Analyst 2014년 1월 26일
Then try using Youssef's code.

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

채택된 답변

Youssef  Khmou
Youssef Khmou 2014년 1월 26일
you can this interpretation : representing the coordinates of five centroids in one euclidean space :
T= [ 1 2 3 ;4 5 6 ;1 2 3 ;4 5 6 ;1 2 3 ];
figure, plot3(T(:,1),T(:,2),T(:,3),'*'); grid on

추가 답변 (1개)

Walter Roberson
Walter Roberson 2014년 1월 26일
plot3() is suitable for plotting lines or markers in 3 dimensional space, but your centroids are in 5 dimensional space.
There is no plot5() as MATLAB has not yet been revised to accommodate 5-dimensional displays. If you have a 5-dimensional display that you could lend Mathworks, their work on a driver would undoubtedly proceed much faster.
  댓글 수: 2
Tomas
Tomas 2014년 1월 26일
ok, thanks :), when I have matrix 5x 3
T=
centroid1[ 1 2 3 ;
centroid2 4 5 6 ;
centroid3 1 2 3 ;
centroid4 4 5 6 ;
centroid5 1 2 3 ]
can i draw matrix ?
Image Analyst
Image Analyst 2014년 1월 26일
That threw us when you originally said 5x5 and then used non-standard syntax. You should have said:
T= [...
1 2 3 ; % centroid1
4 5 6 ; % centroid2
1 2 3 ; % centroid3
4 5 6 ; % centroid4
1 2 3 ] % centroid5
So now that we know what you mean, it appears that Youssef's code should do it.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by