I’m looking for a quick and easy method to do the below four things
Replace P rows of an MN matrix with a PN matrix
Replace P columns of an MN matrix with a MP matrix
Retrieve P rows from an MN matrix into a PN matrix
Retrieve P columns from an MN matrix into a MP matrix
All the above apply to dense column major matrices - and assume that I have an idx vector to extract/replace the rows/columns like below
idx=[0,3,5,7,8,9,10,16,16,17]
So to rephrase, I’m looking for an easy to code and quick to run method to
M.getcols(idx) creates a matrix M10 containing the 0th,3rd,5th…17th columns
M.setrows(idx) Puts the rows of the 10N matrix into the 0th,3rd,5th,…17th rows of M
Thanks!