Institut de Robòtica i Informàtica Industrial

rand

PURPOSE ^

Generates random ponts on a Gaussian.

SYNOPSIS ^

function r=rand(g,varargin)

DESCRIPTION ^

   Generates random ponts on a Gaussian.

   Generates a random point following the given Gaussian distribution, g.

 Returns
   R: A column-wise set of randomly generated vectors.

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:
  • Prediction Belief evolution under the given action.
  • Prediction Belief evolution under the given action.
  • Prediction Belief evolution given a transition model.
  • Update Belief evolution under an observation model.
  • MakeFigure3 Generates Figure 3.
  • CompressGR Gaussian mixture compression using the Golberger and Roweis method.
  • rand Generates random points on a GMixture.
  • RandVector Selects and element from a discrete probability distribution.
  • CS_CO_ObsModel CS_CO_ObsModel constructor.
  • CS_DO_ObsModel CS_DO_ObsModel constructor.
  • DiscretizeObsModel Discretizes the observation model on the observation side.
  • Perseus The Perseus point-based POMDP solver.
  • RandomAction Draws a random action from a POMDP.
  • SampleBeliefs Samples a set of beliefs from a POMDP.
  • SimulateFrom Simulates a POMDP from a given belief.
  • SimulationStep Executes one step of a POMDP simulation.
  • iPerseus Improved version of Perseus.
  • Discretize Converts a continuous space into a discrete one.
  • rand Random state from a continuous space.
  • rand Random state from a discrete space.

SOURCE CODE ^

0001 function r=rand(g,varargin) 
0002 %   Generates random ponts on a Gaussian.
0003 %
0004 %   Generates a random point following the given Gaussian distribution, g.
0005 %
0006 % Returns
0007 %   R: A column-wise set of randomly generated vectors.
0008 
0009   if nargin>1
0010     n=varargin{1};
0011   else
0012     n=1;
0013   end
0014   
0015     if g.d==0
0016         r=repmat(g.m,1,n);
0017   else  
0018         L=chol(g.S);
0019         A_temp=normrnd(0,1,g.dim,n);
0020         A=L*A_temp;
0021     r=repmat(g.m,1,n)+A;
0022     end


Institut de Robòtica i Informàtica Industrial

Generated on Wed 05-Aug-2009 15:05:21 by m2html © 2003