Extracting submatrices with an existing list of indices



Hi all, I have to extract a submatrix and I have the indices of columns to be 
removed. The function:

submatrix(M,j1,j2,...jn)

where M is the matrix and 
j1,...,jn are the indices of columns to be removed, requires the indices to be 
typed directly as integer numbers. But I have a list of this indices 
represented by an array, so how can I use this array to in the submatrix 
function?
In example: 

M : matrix([1,2,3,4,5],[6,7,8,9,10]);

is the matrix, 
and the array j of indices is undeclared and created in a for...do loop in wich 
it could result

j[1] : 2;
j[2] : 5;

so there are two columns to delete, the 
2nd and the 5th.
There is a way to use j in the submatrix function? Or do I 
need to write some extra code? Maxima requires the column indices to be of type 
NUMBER, so I need a way to convert the array j in a sequence of numbers...


Thanks, Stefano