vectors from array
Afficher commentaires plus anciens
What is the best way to create vectors from columns of an array?
Réponse acceptée
Plus de réponses (1)
Paulo Silva
le 14 Déc 2011
a=randi(5,3,5) %sample array
%put all columns of the array in diferent cells
b=arrayfun(@(x)a(:,x),1:size(a,2),'uni',0);
c=1; %choose the column
v=b{c} %get the vector of that column
Catégories
En savoir plus sur Cell Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!