Main Content

sampleUniform

Sample state using uniform distribution

Since R2021b

Description

states = sampleUniform(manipSS) samples one or more random states within the bounds of the manipulator state space using a uniform distribution.

states = sampleUniform(manipSS,numSamples) samples the number of states specified by numSamples.

Input Arguments

collapse all

Manipulator state space, specified as a manipulatorStateSpace object, which is a subclass of nav.StateSpace (Navigation Toolbox).

Number of samples, specified as a positive integer.

Output Arguments

collapse all

Sampled states from the state space, returned as an n-element row vector or m-by-n matrix. n is the dimension of the state space specified in the NumStateVariables property of manipSS. m is the number of samples specified in numSamples. All states are sampled within the bounds specified by the StateBounds property of manipSS.

Version History

Introduced in R2021b