function importTrace(fileToRead1) %IMPORTFILE(FILETOREAD1) % Imports data from the specified file % FILETOREAD1: file to read % Auto-generated by MATLAB on 24-Nov-2011 11:03:50 DELIMITER = ' '; HEADERLINES = 23; % Import the file newData1 = importdata(fileToRead1, DELIMITER, HEADERLINES); % Create new variables in the base workspace from those fields. vars = fieldnames(newData1); for i = 1:1 assignin('base', vars{i}, newData1.(vars{i})); end