function sData = som_data_struct(D, varargin)
%SOM_DATA_STRUCT Create a data struct.
%
% sData = som_data_struct(D, [argID, value, ...])
%
% sData = som_data_struct(D);
% sData = som_data_struct(D,'name','my_data','labels',labs);
%
% Input and output arguments ([]'s are optional):
% D (matrix) data matrix, size dlen x dim
% [argID, (string) See below. These are given as argID, value pairs.
% value] (varies)
%
% sData (struct) created data struct
%
% Here are the argument IDs and corresponding values:
% 'labels' (string array / cellstr) labels for each data vector,
% length=dlen
% 'name' (string) data name
% 'comp_names' (string array / cellstr) component names, size dim x 1
% 'comp_norm' (cell array) normalization operations for each
% component, size dim x 1. Each cell is either empty,
% or a cell array of normalization structs.
%
% For more help, try 'type som_data_struct' or check out online documentation.
% See also SOM_SET, SOM_INFO, SOM_MAP_STRUCT.
%%%%%%%%%%%%% DETAILED DESCRIPTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% som_data_struct
%
% PURPOSE
%
% Creates a data structure.
%
% SYNTAX
%
% sD = som_data_struct(D);
% sD = som_data_struct(...,'argID',value,...);
%
% DESCRIPTION
%
% Creates a data struct. The struct contains, in addition to the data
% matrix, component names, normalization operations for the components,
% labels for each vector, and a name for the whole data set. All of these
% can be given in the optional arguments of the function. If left
% unspecified, they are given default values.
%
% Field Type Size / default value
% ------------------------------------------------------------------------