Compact matlab matrix indexing notation
- by AnnaR
I've got an nxk sized matrix, containing k numbers per row. I want to use these k number as indexes to k-dimensional matrix. Is there any compact way of doing so in matlab or must I use a for-loop?
This is what I want to do (in matlab-pseudo code), but in a more matlabish way.
for row=1:1:n
finalTable(row) = kDimensionalMatrix(indexmatrix(row, 1),...
indexmatrix(row, 2),...,indexmatrix(row, k))
end