Main Content

sampleGaussian

Sample state using Gaussian distribution

Description

state = sampleGaussian(space,meanState,stdDev) returns a sample state of the state space based on a Gaussian (normal) distribution with specified mean, meanState, and standard deviation, stdDev.

state = sampleGaussian(space,meanState,stdDev,numSamples) returns a number of state samples. The number is equal to numSamples.

Input Arguments

collapse all

State space object, specified as a stateSpaceSE2, a stateSpaceDubins, or a stateSpaceReedsShepp object.

Data Types: object

Mean state of the Gaussian distribution for sampling, specified as a 3-element vector of real values.

Example: [5 5 pi/3]

Data Types: single | double

Standard deviation of the Gaussian distribution for sampling, specified as a 3-element vector of nonnegative values.

Example: [0.1 0.1 pi/18]

Data Types: single | double

Number of samples, specified as a positive integer.

Data Types: single | double

Output Arguments

collapse all

State samples, returned as an N-by-3 real-valued matrix. N is the number of samples. Each row of the matrix corresponds to one incidence of state in the state space.

Data Types: single | double

Introduced in R2019b