Dataset subsasgn

From Eigenvector Documentation Wiki
Jump to: navigation, search

Contents

Purpose

Assign for DataSet objects using Structure and index notation.

Synopsis

x.field{vdim,vset} = value;

Description

This provides direct assignment of DataSet Object Fields.

  • x.field = value;

sets the field for a DataSet object to value. This syntax is used for the following fields:

name:  char vector or cell of size 1 with char contents.
author:  char vector or cell of size 1 with char contents.
date:  6 element vector (see CLOCK).
type:  field '.data' must not be empty to set '.type', can have value 'data' or 'image'. See documentation for type 'batch'.
data:  double, single, logical, int or uint array, or cell array (type 'batch' see documentation).
imagemode:  scalar double.
imagesize:  variable-length vector of double.
description:  char array or cell with char contents.
userdata:  filled with user defined data.
  • x.field{vdim} = value;

This syntax is used for the following fields:

 include: row vector of maximum length size(x.data,vdim) e.g. 1:size(x.data,vdim).
  • x.field{vdim,vset} = value;

sets the field for a DataSet object to value for the specified dimension vdim and optional set vset {default: vset=1}, e.g. the vset input allows for multiple sets of labels to be used. The field '.data' must not be empty to set the values. This syntax is used for the following fields:

label:  character or cell array with size(x.data,vdim) rows containing labels for the vdim dimension/mode.
labelname:  row vector of class char or 1 element cell containing a name for the label set.
axisscale:  vector of class double (real elements) with size(x.data,vdim) elements. Each contains an axis scale to plot against for the vdim dimension/mode (e.g. x.axisscale{2,1} is a numerical scale for columns, and x.axisscale{1,1} is a numerical scale for rows). See documentation for type 'batch'.
axisscalename:  row vector of class char or 1 element cell containing a name for the axis scale.
title:  row vector of class char or 1 element cell containing a title for the vdim dimension/mode.
titlename:  row vector of class char or 1 element cell containing a name for the title.
class:  vector of class double (integer elements) and size(x.data,vdim) elements. Each element is a class identifier that can be used in plotting, classification, or cross-validation.
classname:  row vector of class char or 1 element cell containing a name for the class set.

Examples

mydataset.author = 'James Joyce';
mydataset.axisscale{2} = [1:.5:25]; %2nd dim axis scale
mydataset.title{1,2} = 'Second title for first dim';

See Also

DataSet Object Fields, dataset_get, dataset_set, dataset_subsref

Views
Personal tools