perClass Documentation
version 5.4 (7-Dec-2018)
SETDATA  Set data matrix in a data set


    A        SDDATA set
    DATA     Data matrix (double)
    FEATLAB  SDLAB object with feature labels corresponding to DATA

    B        SDDATA object

 SETDATA sets the new data matrix DATA into data set A.  This is useful
 when we compute a new representation of samples in A.  Data set feature
 labels are preserved, if DATA has the same number of features (columns)
 as A and FEATLAB is not specified.  New feature labels are generated
 ('Feature x') if FEATLAB is not provided and feature sizes differ.

 >> load digits  % load digit data set
 >> mean_data=mean(+a,2); % compute column vector with a mean of each sample
 % create data set b with a single 'mean' feature (from data set a)
 >> b=setdata(a,mean_data,sdlab('mean'));