Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Finding Permutations
Date: Sun, 27 Jun 2010 22:32:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 8
Message-ID: <i08jh7$er3$1@fred.mathworks.com>
References: <i08fup$ri0$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1277677927 15203 172.30.248.37 (27 Jun 2010 22:32:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 27 Jun 2010 22:32:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:648504

"Jack " <jack_sama_1981@yahoo.com> wrote in message <i08fup$ri0$1@fred.mathworks.com>...
> Hi;
> 
> This question seems easy but do you know how to find all possible permutations for FOUR variables where each variable can take a value from 1 to 10. I want to put all posible permuatations in a single matrix.
- - - - - - - - - -
  If you want each of four variables to be able to assume any value from 1 to 10, independently of the other variables, then you want all possible combinations, of which there are 10^4 = 10000.  If you want to restrict them so that no two are alike, then there would be 10!/6! = 5040 of them.  Which, if either of these, are you interested in?

Roger Stafford