Skip to Main Content Skip to Search
Product Documentation

set - Class: dataset

Set and display properties

Syntax

set(A)
set(A,PropertyName)
A = set(A,PropertyName,PropertyValue,...)
B = set(A,PropertyName,value)

Description

set(A) displays all properties of the dataset array A and their possible values.

set(A,PropertyName) displays possible values for the property specified by the string PropertyName.

A = set(A,PropertyName,PropertyValue,...) sets property name/value pairs.

B = set(A,PropertyName,value) returns a dataset array B that is a copy of A, but with the property 'PropertyName' set to the value value.

Examples

Create a dataset array from Fisher's iris data and add a description:

load fisheriris
NumObs = size(meas,1);
NameObs = strcat({'Obs'},num2str((1:NumObs)','%-d'));
iris = dataset({nominal(species),'species'},...
               {meas,'SL','SW','PL','PW'},...
               'ObsNames',NameObs);
iris = set(iris,'Description','Fisher''s Iris Data');
get(iris)
   Description: 'Fisher's Iris Data'
   Units: {}
   DimNames: {'Observations' 'Variables'}
   UserData: []
   ObsNames: {150x1 cell}
   VarNames: {'species' 'SL' 'SW' 'PL' 'PW'}

See Also

get | summary

  


 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS