function CPF003 = importfile(filename, dataLines)
%IMPORTFILE Import data from a text file
%  CPF003 = IMPORTFILE(FILENAME) reads data from text file FILENAME for
%  the default selection.  Returns the data as a table.
%
%  CPF003 = IMPORTFILE(FILE, DATALINES) reads data for the specified row
%  interval(s) of text file FILENAME. Specify DATALINES as a positive
%  scalar integer or a N-by-2 array of positive scalar integers for
%  dis-contiguous row intervals.
%
%  Example:
%  CPF003 = importfile("\\atlas\projectlibrary\CPF\CPF003\Data\ParagonTests\2021-11-12T18-28-7\CPF003.001.msg", [2, Inf]);
%
%  See also READTABLE.
%
% Auto-generated by MATLAB on 15-Nov-2021 09:58:11

%% Input handling

% If dataLines is not specified, define defaults
if nargin < 2
    dataLines = [2, Inf];
end

%% Set up the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 17);

% Specify range and delimiter
opts.DataLines = dataLines;
opts.Delimiter = ["\t"];

% Specify column names and types
opts.VariableNames = ["MBARICoastalProfilingFloat", "VarName2", "Var3", "Var4", "Var5", "Var6", "Var7", "Var8", "Var9", "Var10", "Var11", "Var12", "Var13", "Var14", "Var15", "Var16", "Var17"];
%opts.SelectedVariableNames = ["MBARICoastalProfilingFloat", "VarName2"];
opts.VariableTypes = ["string", "string", "string", "string", "string", "string", "string", "string", "string", "string", "string", "string", "string", "string", "string", "string", "string"];

% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";

% Specify variable properties
opts = setvaropts(opts, ["MBARICoastalProfilingFloat", "VarName2", "Var3", "Var4", "Var5", "Var6", "Var7", "Var8", "Var9", "Var10", "Var11", "Var12", "Var13", "Var14", "Var15", "Var16", "Var17"], "WhitespaceRule", "preserve");
opts = setvaropts(opts, ["MBARICoastalProfilingFloat", "VarName2", "Var3", "Var4", "Var5", "Var6", "Var7", "Var8", "Var9", "Var10", "Var11", "Var12", "Var13", "Var14", "Var15", "Var16", "Var17"], "EmptyFieldRule", "auto");

% Import the data
CPF003 = readtable(filename, opts);

end