plot 3, describe centroid
Show older comments
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 Comments
Image Analyst
on 26 Jan 2014
Edited: Image Analyst
on 26 Jan 2014
I presume centroidn is a 1 by 2 array. So you have a 5x5 array, as you said. What do you consider to be x, y, and z?
Tomas
on 26 Jan 2014
Image Analyst
on 26 Jan 2014
Then try using Youssef's code.
Accepted Answer
More Answers (1)
Walter Roberson
on 26 Jan 2014
0 votes
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 Comments
Tomas
on 26 Jan 2014
Image Analyst
on 26 Jan 2014
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.
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!