Re: Matrix rows
- To: mathgroup at smc.vnet.net
- Subject: [mg65785] Re: [mg65757] Matrix rows
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 17 Apr 2006 02:28:43 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
m = {{1, 2, 3}, {4, 5, 6}, {1, 2, 3}}; If[Length[Union[m]] < Length[m], "duplicate row"] duplicate row Bob Hanlon > > From: "King, Peter R" <peter.king at imperial.ac.uk> To: mathgroup at smc.vnet.net > Subject: [mg65785] [mg65757] Matrix rows > > > [This post has been delayed due to email problems - moderator] > > Another question for which I am sure there is a trivial solution. > > > If I have a matrix (not square - nearly always has more rows than > columns). Is there a simple way to check if two (or more) rows are the > same. I don't need to know how many rows are the same just if any are > the same. Clearly I could loop through the matrix but this must be of > order n^2 for an n row matrix. > > Any suggestions? > >