Load_ExtData
Location: ..\cubatch\Common\Load_ExtData.m

function [Stat,ModelOut] = Load_ExtData (MO,MainFig);
Description:
It loads new data for a model to be applied on. It checks that the dimensions are compatible with the model: if any of the dimensions apart from the first is not compatible, the procedure is not completed. An exception is made when the last mode has name 'Time' (case insensitive), when the array is filled in (i.e. when the model is applied, not upon loading, because of the preprocessing that is sometimes required) with NaN. The original dimensions are then stored in ModelOut.info.initialsize (possibly this will be moved to ModelOut.prediction). In case the ModelOut.info.fillin field is empty or non-existing and the operational mode is 'advanced', a requester appears to establish the desired method.
When the data is loaded as a double array (i.e. not a cbdataset object), the labels in the first mode are set by default to: 'Proj. #')
NB. This function can be significantly simplified as part of the code is no longer in use. This will be done in subsequent releases.
Inputs:
MO: ModelOut structure (necessary as the function access ModelOut.info.content (to check the dimensions of the original array, in case they are not compatible) and ModelOut.info.fillin (in case it is necessary and it is empty the suitable requester appears).
MainFig: main figure handle (this second parameter is to be removed in the next revision of this file).

Outputs:
Stat: 0 if an error occurred when attempting to load new data, 1 if the operation is successfully completed
ModelOut: ModelOut data structure with suitable values in the 'prediction' field

Called by:
nPLS1Apply, PARAFACApply
Subroutines:
Internal: None
External: definemodelout

Author:
Giorgio Tomasi
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark
Last modified: 19-Nov-2002 16:50:14
Contact: Giorgio Tomasi, gt@kvl.dk
References