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

Home » Public Forums » archive » Remove Duplicate Rows
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Remove Duplicate Rows [message #82996 is a reply to message #82914] Fri, 25 January 2013 15:20 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
On Saturday, January 26, 2013 12:05:37 AM UTC+1, Gompie wrote:
> 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 !!!

One way of doing it would be to make a modified version of the uniqrows function under a new name.

At the point where a duplicate rowis found (row i equals row j), the index j is stored in the duplicateindx array for later removal. At that point you could add 1 to the i:th element of another array (that is as long as the number of rows and initialized to unity in all elements before the loop starts), lets call it multfac. And then, before removing the duplicate rows, loop for i=0,Nrows-1 and multiply row i by multfac[i].

Something like that should work.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Remove Duplicate Rows
Next Topic: Re: 3-D arrows

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

Current Time: Sat Oct 11 11:15:42 PDT 2025

Total time taken to generate the page: 1.20020 seconds