Main Content

10 results in File Exchange

Generation of Random Variates

Version 1.0.0.0 by James Huntley

generates random variates from over 870 univariate distributions

- DERANGED_ENUM returns the number of derangements of N objects.
- deranged_cdf.m - evaluates a Deranged Cumulative Distribution Function.
- deranged_pdf.m - evaluates a Deranged Probability Density Function.
  • 4.8K (All time)
  • 2 (Last 30 days)
  • 4.1 / 5
  • Community
  • 9 Feb 2012

Random derangement

Version 1.0.1 by Bruno Luong

Generate sequences of random derangement

A derangement is a permutation of the elements of a set, such that no element appears in its original position.The code use non rejection method for better predictable runtime.

  • 44 (All time)
  • 2 (Last 30 days)
  • -- / 5
  • Community
  • 1 Mar 2021

RANDPERMFULL

Version 4.0.0.1 by Jos (10584)

RANDPERMFULL (N) returns a random derangement (complete permutation) of the integers from 1 to N

RANDPERMFULL(N) creates a row vector R, such that R(j) ~= j for all j=1:N. This type of permutation is called a derangement.N should be larger than 1.Example:randpermfull(7) % might be [2 4 5 6 1 7 3], but not

- - Random complete or full permutation (derangement)
  • 533 (All time)
  • 1 (Last 30 days)
  • -- / 5
  • Community
  • 23 May 2019

CeItrConnGUI

Version 1.0.0.0 by Gal Haspel

This GUI is used to study the iterativity of connections within the locomotion network of C. elegans

- RANDPERMFULL - Random complete or full permutation (derangement)
  • 292 (All time)
  • 1 (Last 30 days)
  • -- / 5
  • Community
  • 28 Jul 2011

Shuffle

Version 1.4.0.0 by Jan

Random permutation of array elements, C-Mex: much faster than RANDPERM

output elements. Optional, default: N.OUTPUT: Index: [1:NOut] elements of shuffled [1:N] vector in the smallest possible integer type.3. Derangement index:Index = Shuffle(N, 'derange', NOut)Equivalent to

  • 6.9K (All time)
  • 5 (Last 30 days)
  • 4.6 / 5
  • Community
  • 6 Mar 2011

RPG Lab

Version 1.2.0.0 by Derek O'Connor

A set of functions for generating and testing random permutations of the integers (1,2, ..., n).

The main functions provided are:1. p = GRPfys(n); generates a random permutation of length n.2. p = GRPmex(n); generates a random permutation of length n.3. p = GRDrej(n); generates a derangement of

  • 581 (All time)
  • 1 (Last 30 days)
  • 5.0 / 5
  • Community
  • 26 Jan 2011

PARTPERM -- Partial random permutation of a vector

Version 1.0.0.0 by David Fass

Partial random permutation of a vector.

("derangement"). If you don't like this, use the following syntax: X = PARTPERM(A,IDX,'allow') randomly permutes the elements of vector A which are specified by vector IDX, but allows indexed elements to remain

  • 1.8K (All time)
  • 1 (Last 30 days)
  • 5.0 / 5
  • Community
  • 3 Sep 2004

Generate uniform pseudo-random integers from linear range.

Version 1.4.0.0 by DS

RAND_INT(R,N) returns an n-by-n matrix containing pseudo-random integer values from range R.

RANDPERMFULL (derangement)#17981 - RANDBLOCK#27076 - Shuffle

  • 474 (All time)
  • 2 (Last 30 days)
  • 5.0 / 5
  • Community
  • 27 Jan 2014

  • 659 (All time)
  • 1 (Last 30 days)
  • -- / 5
  • Community
  • 13 Oct 2009

Subfactorial

Version 1.0.0.0 by Yash

Calculate subfactorial of integers up to 170.

  • 453 (All time)
  • 1 (Last 30 days)
  • -- / 5
  • Community
  • 26 Jun 2009