help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to obtain discernible permutations of a vector?


From: Juan Pablo Carbajal
Subject: Re: How to obtain discernible permutations of a vector?
Date: Tue, 18 Nov 2014 10:29:26 +0100

On Tue, Nov 18, 2014 at 5:56 AM, AlexZen <address@hidden> wrote:
>
>
> Hi everyone,
>
> I have the following problem : let's say I have the vector v=(1,1,1,0,0) and
> I want to generate the permutations of this vector. The problem is, if I
> simply use perms(v), matlab is going to generate many degenerate vectors
> because it does not understand that the elements of my vector are similar
> (so for instance I will have like ten exemplars of (1,0,1,1,0) , then ten of
> (0,1,1,1,0), etc). Of course I can easily make a code that gets rid of those
> degenerate vectors, but it is very time consuming when the length of the
> vector gets bigger.
>
> Thank you for your help guys.
>
> Alex.
>
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/How-to-obtain-discernible-permutations-of-a-vector-tp4667379.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave

Does this conversation helps
https://lists.gnu.org/archive/html/help-octave/2014-01/msg00432.html

Can you order your set such that it reduces to counting in binary?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]