Path: news.mathworks.com!not-for-mail
From: "Gustavo Morales" <gustavo.morales.2000@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Combination with matrices
Date: Tue, 5 May 2009 21:42:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <gtqbra$a81$1@fred.mathworks.com>
References: <2725087.60310.1241556131148.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "Gustavo Morales" <gustavo.morales.2000@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1241559722 10497 172.30.248.38 (5 May 2009 21:42:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 5 May 2009 21:42:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1796991
Xref: news.mathworks.com comp.soft-sys.matlab:537712


Gustavo <guminozzo@hotmail.com> wrote in message <2725087.60310.1241556131148.JavaMail.jakarta@nitrogen.mathforum.org>...
> Hi, 
> 
> supposed that i have a matrix like this one,
> A = [1 2 3, 4 5 6, 7 8 9]
> 
> i need to find all the possible combinations with this matrix in the matlab. Does anybody nows how it is possible?
> 
> Thanks

Hi!

Do you need to mantain the size of your matrix?
 Try this:

reshape(A(randperm(numel(A))),size(A,1),size(A,2))

Best regards from Venezuela!