Initialise
Location: ..\cubatch\private\Initialise.m

function [ModelIn,Content,X] = Initialise (Content,ModelIn,X,Xt,Xfil,Flags,Matrices,Sizes);
Description:
Set or updates the informations stored in ModelIn, Content and X.
Inputs:

Content, ModelIn, X: | the current data structures ModelIn, Content and X
> Xt: | cell vector where each cell is a new loaded data set. Two classes of data are supported as elements: double arrays and cbdatasets. The treatment varies also depending on whether the data is "single set" or "multiple set".
> Class | Type | Treatment
> Double | Single set | The data are given default labels. The first mode has 'Sam.' as default label, the others have 'Var.'.
> Multiple set | The sizes of the single sets are passed with the Sizes (non optional) parameter. The name of the loaded sets are passed with Matrices. This additional information is then saved in the 'description' (set names) and 'userdata' (set lengths) fields of the CBDataSet object created from the data. The labels in the combined mode (i.e. the first) are given in the form 'Var. #/ Var. #' and the combined mode is given name 'Mode a/Mode b'.
> CBDataSet | Single set | Nothing is added or changed in the new data set. If the labels in the first mode are different from those already present in X, they are uniformated into the latters.
> Multiple set | The list of single sets is read via the 'description' field while the sizes of the single sets are saved in the 'userdata' field. NB If this parameter is produced via concatenation of more cbdatasets upon loading, the single files names (passed with Matrices) are automatically added to the corresponding labels in the combined mode and the combined mode itself is given name 'Mode a/Mode b'.
Xfil: | cell vector of length two. Xfil{1} contains the name (full path) of the file holding the data Xfil{2} for single sets and multiple sets hold in a cbdataset object is the name of the array within file Xfil{1}. In the case of double/multiple sets the second element is disregarded.
Flags: | vector of length two. Flags(1) is set to 1, all the data structures (i.e. ModelIn, Content and X) are reinitialised. Flags(2) = 1 indicates that the loaded array is made up of several arrays/cbdatasets loaded separately.
Matrices (optional): | name of the single sets constituing a "multiple set" data set.
Sizes (optional): | vector holding the sizes of the single sets of a multiple set of class double

Outputs:
ModelIn: ModelIn structure
Content: Content data structure
X: X data structure

Called by:
CuBatch, ImportData, PermuteWindow, ReshapeWindow, SelectSamples
Subroutines:
Internal: None
External: DSContent

Author:
Giorgio Tomasi
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark
Last modified: 26-Oct-2002 23:45:10
Contact: Giorgio Tomasi, gt@kvl.dk
References