Main Content


Class: nav.StateSampler
Namespace: nav

Sample state

Since R2023b


states = sample(sampler)
states = sample(sampler,numsamples)


states = sample(sampler) samples one state from the specified state sampler object.

states = sample(sampler,numsamples) returns a specified number of state samples.

Input Arguments

expand all

State sampler object, specified as an object of a subclass of nav.StateSampler class.

Number of samples, specified as a positive integer.

Data Types: single | double

Output Arguments

expand all

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

Data Types: single | double

Version History

Introduced in R2023b