Plotting Points from Cells
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a 10000x1 cell array. Each cell holds a 1x3 matrix with the x,y, and z coordinates of a point. How can I plot the points? Thank you in advance.
0 commentaires
Réponse acceptée
Plus de réponses (1)
Matt Fig
le 14 Nov 2012
Modifié(e) : Matt Fig
le 14 Nov 2012
Say your cell array is called C, like this:
C = cellfun(@(x) rand(1,3),cell(1000,1),'Un',0);
Now we can plot the points as this:
L = cellfun(@(x) line(x(1),x(2),x(3)),C);
set(L,'marker','o','markersize',3,'markerfac','b')
view(3)
0 commentaires
Voir également
Catégories
En savoir plus sur Computational Geometry dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!