Home > data-access > load_data_from_file.m

load_data_from_file

PURPOSE ^

SYNOPSIS ^

function loaded_data = load_data_from_file(filename, numheaders, columns)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function loaded_data = load_data_from_file(filename, numheaders, columns)
0002 loaded_data = [];
0003 if ~isempty(strfind(filename, '.mat'))
0004     if exist(filename, 'file')
0005         load(filename);
0006         loaded_data = sdata.data;
0007     end
0008 else
0009     loaded_data = dlmread(filename, ',', numheaders, 0);
0010     if ~isempty(columns)
0011         loaded_data = loaded_data(:,columns);
0012     end
0013 end

Generated on Wed 24-May-2017 00:00:56 by m2html © 2005