vectors from array

12 views (last 30 days)
Gary on 14 Dec 2011
What is the best way to create vectors from columns of an array?

Accepted Answer

David Young
David Young on 14 Dec 2011
vector = array(:, column_number)
Paulo Silva
Paulo Silva on 14 Dec 2011
see my Answer and

Sign in to comment.

More Answers (1)

Paulo Silva
Paulo Silva on 14 Dec 2011
a=randi(5,3,5) %sample array
%put all columns of the array in diferent cells
c=1; %choose the column
v=b{c} %get the vector of that column


Find more on Resizing and Reshaping 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!