Separate decimal notation from field boundaries

A pump test file uses semicolons between fields and commas as decimal separators. Its header is SampleID;Flow_L_min, and its two data records are 0014;1,25 and 0015;0,75. Flow values are in L/min, with no thousands separators.


The following MATLAB configuration has already identified the two variable names correctly:


MATLAB
opts = detectImportOptions("pump.csv", "Delimiter", ";");
opts = setvartype(opts, "SampleID", "string");
opts = setvartype(opts, "Flow_L_min", "double");


Which additional statement explicitly makes the numeric interpretation match the file before executing T = readtable("pump.csv", opts);?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Data Files and Character Strings Questions: