Re: Matrix rows
- To: mathgroup at smc.vnet.net
- Subject: [mg65793] Re: Matrix rows
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Mon, 17 Apr 2006 02:28:49 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 4/16/06 at 3:49 AM, peter.king at imperial.ac.uk (King, Peter R) wrote: >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. A simple way to achieve this would be Length@Union[matrix]==Length@matrix This will return False if there is a duplicate row and True if there are no duplicate rows. -- To reply via email subtract one hundred and four