selecting rows of an array

6 views
Skip to first unread message

Ross

unread,
Nov 28, 2008, 10:32:20 AM11/28/08
to The MATLAB users
Hi there,

I have a question regarding matrix manipulation. I am using a 'brute
force' method, but I guess there might be straightforward way to do
this that I am not aware of.

Assume you have array A, s.t. [N1 N2 N3] = size(A).
Also, assume you have a vector p, s.t. N1 = length(p), whose entries
are integers between 1 and N3.

You want to obtain a new matrix B, N1-by-N2 where the rows are
selected using p.

Thanks!
Ross
Reply all
Reply to author
Forward
0 new messages