The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: many random permutations?
Replies: 1   Last Post: Jul 17, 2008 5:56 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Finch

Posts: 9
Registered: 7/17/08
many random permutations?
Posted: Jul 17, 2008 3:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

What is the fastest way to compute 50000 random
permutations on 10 symbols?

I had thought evaluating Z(50000,10), where

Z = @(m,n) arrayfun(@(o) randperm(n), 1:m, 'UniformOutput',

would be good. But I must be making a mistake,
because the following loop:

for k=1:m

seems to be faster! Please let me know. I am
new to Matlab and your advice & code would be
very much appreciated.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.