subsref

Class: qrandset

Subscripted reference for qrandset

Syntax

x = p(i,j)
x = subsref(p,s)

Description

x = p(i,j) returns a matrix that contains a subset of the points from the point set p. The indices in i select points from the set and the indices in j select columns from those points. i and j are vector of positive integers or logical vectors. A colon used as a subscript, as in p(i,:), indicates the entire row (or column).

x = subsref(p,s) is called for the syntax p(i), p{i}, or p.i. s is a structure array with the fields:

typestring containing '()', '{}', or '.' specifying the subscript type.
subsCell array or string containing the actual subscripts.

Examples

CommandReturns
p = sobolset(5); The fifth point
x = p(1:10,:)All columns of the first 10 points
x = p(end,1)The first column of the last point
x = p([1,4,5], :)Points 1, 4, and 5

See Also

Was this topic helpful?