RANDP Matlab script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: randp.m
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Matlab
  • Price:Freeware
  • Company: Josh (View more)

RANDP script description:




Publisher review:
RANDP - Random integers with given probabilities. RANDP - random integers with given probabilitiesR = RANDP(P,N) is an N-by-N matrix with random entries on the interval[1,NUMEL(P)], chosen from the distribution specified by P.RANDP(P,M,N) and RANDP(P,[M,N]) are M-by-N matrices with random entries.RANDP(P,M,N,O,...) or RANDP(P,[M,N,P,...]) generate random arrays.RANDP(P,SIZE(A)) is the same size as A.For large N, the ratio "sum(R(:)==i)/sum(R(:)==j)" approximates"P(i)/P(j)" for two integers i and j in the range [1,NUMEL(P)].Examples:% generate a 10000-by-1 matrix with random entries [1,3] in which 1 occurs% about 10%, 2 about 30% and 3 about 60%R = randp([1 3 6],10000,1) ; sum(R(:)==1)/sum(R(:)==3)% should be ~ 1/6% randomly select 100 elements according to a specific distributionV = {'Red','Green','Blue'} ;ind = randp([80 10 10],200,1) ;R = V(ind) ; % should contain about 160 'Red'See also RAND, RANDSAMPLE (Matlab 7 Stats Toolbox) Requirements: ยท MATLAB Release: R13
RANDP is a Matlab script for Statistics and Probability scripts design by Josh. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5