Commit 6f50cb05 authored by Colin Eles's avatar Colin Eles
Browse files

function to import binary data, found on mathworks site

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@5839 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent d929728e
Loading
Loading
Loading
Loading

importfile.m

0 → 100644
+22 −0
Original line number Diff line number Diff line
function importfile(fileToRead1)
%IMPORTFILE(FILETOREAD1)
%  Imports data from the specified file
%  FILETOREAD1:  file to read

%  Auto-generated by MATLAB on 05-Jul-2010 15:12:19

% Import the file
rawData1 = importdata(fileToRead1);

% For some simple files (such as a CSV or JPEG files), IMPORTDATA might
% return a simple array.  If so, generate a structure so that the output
% matches that from the Import Wizard.
[~,name] = fileparts(fileToRead1);
newData1.(genvarname(name)) = rawData1;

% Create new variables in the base workspace from those fields.
vars = fieldnames(newData1);
for i = 1:length(vars)
    assignin('base', vars{i}, newData1.(vars{i}));
end