MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > does Matlab have any such function 

I need to take a vector of the numbers 
Subject: does Matlab have any such function From: Matt Fig Date: 3 Feb, 2009 02:54:02 Message: 2 of 29 
Matlab does not have such a function. I wrote one, found at the link below, but it doesn't generate the permutations one at a time. There is no way you can use it to get them all either, unless you have astronomical storage. Maybe you could modify it somehow to give the results a few at a time. 
Hi. Thanks very much. Actually I am new to Matlab. I looked at your code and in the example it seems to return all the permutations in matrix form. Does that mean that if I ran MAT = npermutek([1:15],15) I would get 15! rows? 
Subject: does Matlab have any such function From: Roger Stafford Date: 3 Feb, 2009 03:50:03 Message: 4 of 29 
Will <william108@gmail.com> wrote in message <2115737.1233628719570.JavaMail.jakarta@nitrogen.mathforum.org>... 
Subject: does Matlab have any such function From: Matt Fig Date: 3 Feb, 2009 03:56:02 Message: 5 of 29 
Will <william108@gmail.com> wrote in message 
Subject: does Matlab have any such function From: Matt Fig Date: 3 Feb, 2009 04:01:01 Message: 6 of 29 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message 
I have a fixed row of data which I call CL and another row of data which I call Var. Each row has 25,000 entries. 
Subject: does Matlab have any such function From: Matt Fig Date: 3 Feb, 2009 07:31:04 Message: 8 of 29 
I haven't looked over your code, but if you *really* do need to get these permutations one at a time you could do something like this. I have shown a way to get the permutations for [1 2 3 4]. The corresponding code to get them for 1:15 will be ugly, but it will mostly involve a lot of copy/paste activity, it won't be too hard. Good luck. 
Subject: does Matlab have any such function From: Roger Stafford Date: 3 Feb, 2009 08:44:02 Message: 9 of 29 
Will <william108@gmail.com> wrote in message <24898439.1233637284374.JavaMail.jakarta@nitrogen.mathforum.org>... 
Will <william108@gmail.com> wrote in message <2115737.1233628719570.JavaMail.jakarta@nitrogen.mathforum.org>... 
Subject: does Matlab have any such function From: Roger Stafford Date: 3 Feb, 2009 09:37:01 Message: 11 of 29 
"Matt Fig" <spamanon@yahoo.com> wrote in message <gm8rro$o94$1@fred.mathworks.com>... 
Subject: does Matlab have any such function From: John D'Errico Date: 3 Feb, 2009 10:00:05 Message: 12 of 29 
"Eric" <noemail@noemail.com> wrote in message <gm92n2$r2h$1@fred.mathworks.com>... 
Hello. Thank you for your help and your deep thought! I am trying to understand what you mean. You suggest forming the matrix X which will be a 15x15 square matrix. Lets say that the entries of X are denoted by x(i,j). 
18 years is a bit too long. Thank you for that very simple calculation. 
Subject: does Matlab have any such function From: Roger Stafford Date: 3 Feb, 2009 17:53:02 Message: 15 of 29 
"John D'Errico" <woodchips@rochester.rr.com> wrote in message <gm94j4$c7$1@fred.mathworks.com>... 
Subject: does Matlab have any such function From: John D'Errico Date: 3 Feb, 2009 18:05:19 Message: 16 of 29 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gma09u$6l9$1@fred.mathworks.com>... 
Subject: does Matlab have any such function From: Roger Stafford Date: 3 Feb, 2009 18:14:02 Message: 17 of 29 
Will <william108@gmail.com> wrote in message <17296950.1233655772681.JavaMail.jakarta@nitrogen.mathforum.org>... 
Subject: does Matlab have any such function From: Roger Stafford Date: 3 Feb, 2009 19:07:02 Message: 18 of 29 
"Matt Fig" <spamanon@yahoo.com> wrote in message <gm8rro$o94$1@fred.mathworks.com>... 
Hello Roger, 
Subject: does Matlab have any such function From: Roger Stafford Date: 4 Feb, 2009 01:47:02 Message: 20 of 29 
Will <william108@gmail.com> wrote in message <29474463.1233708906150.JavaMail.jakarta@nitrogen.mathforum.org>... 
First let me reply on what you wrote in an earlier post. 
I am now trying to understand what you meant by: 
Subject: does Matlab have any such function From: Matt Fig Date: 4 Feb, 2009 02:50:03 Message: 23 of 29 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message 
As I understand it x(i,j) is the number of times the i in CL occurs in the same place as j in Var (if CL and Var were lined up on top of each other). 
Subject: does Matlab have any such function From: Roger Stafford Date: 4 Feb, 2009 06:19:01 Message: 25 of 29 
Will <william108@gmail.com> wrote in message <5124452.1233717244446.JavaMail.jakarta@nitrogen.mathforum.org>... 
Hi. I am getting some of this but not all by any means. 
Subject: does Matlab have any such function From: Roger Stafford Date: 4 Feb, 2009 23:05:05 Message: 27 of 29 
Will <william108@gmail.com> wrote in message <10598829.1233748789416.JavaMail.jakarta@nitrogen.mathforum.org>... 
Subject: does Matlab have any such function From: Gwendolyn Fischer Date: 10 Feb, 2009 08:05:06 Message: 28 of 29 
Hi Will, 
Subject: does Matlab have any such function From: Gwendolyn Fischer Date: 11 Feb, 2009 15:07:02 Message: 29 of 29 
Hi again, 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.