comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Remove Duplicate Rows
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Remove Duplicate Rows [message #82910] Fri, 25 January 2013 03:22 Go to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den fredagen den 25:e januari 2013 kl. 05:10:50 UTC+1 skrev Gompie:
> I also wanted to know which row numbers have been removed

I have a function that might do what you need.

http://www.isf.astro.su.se/~mats/idl/lecfit/uniqrows-code.ht ml

I added a couple of keywords just now, so let me know if there are any problems. One new keyword is used to return the removed row numbers (like you asked for) and one to specify your matrix conventions, (row,column) or (column,row). The default is (column,row), the convention that goes with using the ## operator for matrix multiplication.
Re: Remove Duplicate Rows [message #82912 is a reply to message #82910] Thu, 24 January 2013 22:01 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Thursday, January 24, 2013 10:42:49 PM UTC-5, Gompie wrote:
> Hi,
>
> I have a 500x500 array of floats. Some of the rows are duplicate.
>
> How do I remove these duplicate rows.

Have you tried UNIQ()?

Craig
Re: Remove Duplicate Rows [message #82913 is a reply to message #82912] Thu, 24 January 2013 20:10 Go to previous messageGo to next message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
I also wanted to know which row numbers have been removed
Re: Remove Duplicate Rows [message #82962 is a reply to message #82910] Tue, 29 January 2013 05:05 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den fredagen den 25:e januari 2013 kl. 12:22:49 UTC+1 skrev Mats Löfdahl:

> http://www.isf.astro.su.se/~mats/idl/lecfit/uniqrows-code.ht ml

New version. Fixed a bug that kicked in when all rows are equal.

Also added a COLUMN keyword that makes it operate on columns instead of rows.
Re: Remove Duplicate Rows [message #82997 is a reply to message #82910] Fri, 25 January 2013 15:05 Go to previous message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
Thanks Mats !!!
The Marks uniq and your uniq pro worked well.
But now I want to sum the repeated columns and replace the repeated by the sum.
Any help !!!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Help with SVDC procedure
Next Topic: Remove Duplicate Rows

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:36:21 PDT 2025

Total time taken to generate the page: 0.00380 seconds