Home > lib > data_new_from_txt.m

data_new_from_txt

PURPOSE ^

data = data_new_from_txt(filename, range = [])

SYNOPSIS ^

function data = data_new_from_txt(filename, range)

DESCRIPTION ^

 data = data_new_from_txt(filename, range = [])

 Loads file and returns a struct containing the following elements:
   data.X: sample dataset
   data.classes: corresponding classes.
   data.x: wavenumber vector, currently running from 1801.47 to 898.81
   data.class_labels: {'0', '1', '2', ...

 Inputs:
   filename: file name
   range: initial and final values for the features labels. If not used, default will be [1801.47, 898.81] for the
   standard file type or feature labels will be taken from the txt file in case of alternative file structure.

 Two file structures are supported:
   - Table of data with no header and last column containing the class
     index. Delimiters such as ';', ' ', or '\t' (Tab) are supported.

   - Table with first row as x-axis values, first column as observation
     identifiers and last column as class indexes. Note that the first and
     last elements of the first row are not used. Only the ';'
     delimiter is supported.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 18-Feb-2010 12:47:47 by m2html © 2003