Registered Member
|
Hi all,
I would like to ask that how can I copy different colounms of a matrix pointing by another matrix ? In Matlab, I do like this, A = [1 2 3 4; 5 2 1 3; 2 3 4 1]; % 3X4 matrix ind = [1 3 4]; % 1X3 matrix B = A(:,ind) % result of B B = [1 3 4;5 1 3;2 4 1] |
Registered Member
|
You can obtain similar results using this code :
I don't know if there is an easiest way to do that. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]