search for: combin_mat

Displaying 1 result from an estimated 1 matches for "combin_mat".

2005 Dec 06
1
Help on a matrix task
...a general solution to the following matrix task: Given: N<-4 input_mat<-matrix(c(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0),ncol=N) combin_mat<-matrix(c(1, 2, 1, 3, 1, 4, 2, 3, 2, 4, 3, 4),ncol=choose(N,2)) Find the indices of rows in "input_mat", whose elements indicated by the pair of elements in each column of "combin_mat", are equal 1. So, for the first column of combin_mat (1,2) the answer shoul...