Home > src > categ_rnd.m

categ_rnd

PURPOSE ^

CATEG_RND Draws samples from a given one dimensional discrete distribution

SYNOPSIS ^

function C = categ_rnd(P,N)

DESCRIPTION ^

CATEG_RND  Draws samples from a given one dimensional discrete distribution

 Syntax:
   C = CATEG_RND(P,N)

 Author:
   Simo Särkkä, 2002

 In:
   P - Discrete distribution, which can be a numeric array
       of probabilities or a cell array of particle structures,
       whose weights represent the distribution.
   N - Number of samples (optional, default 1)

 Out:
   C - Samples in a Nx1 vector

 Description:
   Draw random category

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 19-Feb-2008 17:08:22 by m2html © 2003