dsSubset_old
Subset of a dataset
Contents
Syntax
- ds2=dsSubset(ds, inputNames, fieldValue)
Description
ds2=dsSubset(ds, inputIndex): return a subset of the given ds based on the input indices (a vector)
ds2=dsSubset(ds, inputNames): return a subset of the given ds based on the input names (a cell string)
ds2=dsSubset(ds, inputName, inputValue): return a subset of the given ds based on the input name (a string) having the input value
Example
ds=prData('iris'); disp(ds) ds2=dsSubset(ds, {'petal length', 'petal width'}); disp(ds2)
dataName: 'iris'
inputName: {'sepal length' 'sepal width' 'petal length' 'petal width'}
outputName: {'Setosa' 'Versicolour' 'Virginica'}
input: [4×150 double]
output: [1×150 double]
dataName: 'iris'
inputName: {'sepal length' 'sepal width' 'petal length' 'petal width'}
outputName: {'Setosa' 'Versicolour' 'Virginica'}
input: [4×150 double]
output: [1×150 double]