[Scilab-users] Advice from Scilab community

Stefan Du Rietz sdr at durietz.se
Tue Oct 22 14:42:26 CEST 2013


You can use vectorfind() three times to get the line number.

Regards
Stefan.



On 2013-10-22 13:58, Carrico, Paul wrote:
--------------------
> Dear All
>
> I’m asking here an advice from the community in order to find a (fast
> and clean) solution ; I’ve the following issue :
>
> -I’ve a (n x 4) matrix where n may be huge (several hundred thousand
> of lines is common )
>
> -I need to find and to remove the line wich has the same numbers (but
> different in order)
>
> -I know that there’s only one occurrence … thus when it has been
> found, not necessary to continue
>
> Example :
>
> A = [
>
> X  X  X      X
>
> X  X  X      X
>
> 1 9 1000 994423
>
> X  X  X      X
>
> X  X  X      X
>
> X  X  X      X
>
> 1000 994423 1 9  … or 994423 1 9 1000 … or 9 1000 994423 … only 3
> possible permutations
>
> X  X  X      X
>
> X  X  X      X
>
> X  X  X      X
>
> ]
>
> Any suggestion that avoids the use of (intensive ugly) loops ?
>
> NB:
>
> additional question :
>
> -If t = [1 2 3 4]
>
> -If v = [1 2 3 4]
>
> -If z = [0 2 3 9]
>
> -Then (t == v) provides [T T T T]
>
> -Then (z == v) provides [F T T F]
>
> -…. Is it possible to have a single Boolean with all the cells met the
> requirement (T) and when it’s not the case (F) ?
>
> Thanks in advance
>
> Paul
>
> --------------------------------------------------------------------------------
>
>
> Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.
>
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>





More information about the users mailing list