MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Column Product of a Matrix of zeros and 1's

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87957] Column Product of a Matrix of zeros and 1's
  • From: P_ter <petervansummeren at gmail.com>
  • Date: Mon, 21 Apr 2008 03:26:01 -0400 (EDT)

I have a matrix of zero's and ones: myGlobalMatrix; also a set called thisSet with the columns of myGlobalMatrix which have to be multiplied (e.g. column 1,3,4). I would like to know the positions of the 1's. I do this as follows: 
Flatten[Position[Product[myGlobalMatrix[[All,i]],{i, thisSet}],1]]
But this is to general. It does not use that the matrix consists of zeros and ones. 
Can this be taken into account?
with friendly greetings,
P_ter


  • Prev by Date: Sorting 3 points
  • Next by Date: function not evaluating question tia sal2
  • Previous by thread: Re: Sorting 3 points
  • Next by thread: Re: Column Product of a Matrix of zeros and 1's